Tony Strauss created JRUBY-6471: ----------------------------------- Summary: JRuby doesn't seem to forward java methods to java arrays properly Key: JRUBY-6471 URL: https://jira.codehaus.org/browse/JRUBY-6471 Project: JRuby Issue Type: Bug Components: Java Integration Affects Versions: JRuby 1.6.6 Reporter: Tony Strauss
As per the below jruby/irb session, getClass cannot be invoked on a Java array through JRuby. It can be on a Java Integer. jruby-1.6.6 :001 > a = Java::byte[1024].new => #<#<Class:0x487bd46a>:0x39b6a053> jruby-1.6.6 :002 > a.respond_to?(:getClass) => false jruby-1.6.6 :003 > i = java.lang.Integer.new(1) => #<Java::JavaLang::Integer:0x2a47b35d> jruby-1.6.6 :004 > i.respond_to?(:getClass) => true The equivalent code works fine from Java: public class Boog { public static void main(String[] args) { byte[] a = new byte[3]; System.out.println(a.getClass().toString()); System.out.println(a.getClass().isArray()); } } This seems to be the case for not only getClass() but also for other Java methods that should be available on Java arrays (i.e., toString()). -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email