Calling java.lang.Intger#method raises Exception
------------------------------------------------
Key: JRUBY-2549
URL: http://jira.codehaus.org/browse/JRUBY-2549
Project: JRuby
Issue Type: Bug
Components: Java Integration
Affects Versions: JRuby 1.1+
Reporter: Evan David Light
Example:
include Java
java.lang.Integer.method 'new'
Exception in thread "main" java.lang.ClassCastException: org.jruby.RubyClass
at org.jruby.RubyMethod.inspect(RubyMethod.java:212)
at org.jruby.RubyMethodInvoker$inspect_method_0_0.call(Unknown Source)
at
org.jruby.internal.runtime.methods.JavaMethod$JavaMethodZero.call(JavaMethod.java:82)
at
org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:66)
at
org.jruby.runtime.CallSite$InlineCachingCallSite.cacheAndCall(CallSite.java:106)
at
org.jruby.runtime.CallSite$InlineCachingCallSite.call(CallSite.java:248)
at org.jruby.evaluator.ASTInterpreter.callNode(ASTInterpreter.java:656)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:310)
at
org.jruby.evaluator.ASTInterpreter.fCallNode(ASTInterpreter.java:1105)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:356)
at org.jruby.evaluator.ASTInterpreter.eval(ASTInterpreter.java:170)
at
org.jruby.internal.runtime.methods.DefaultMethod.interpretedCall(DefaultMethod.java:174)
at
org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:150)
at
org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:225)
at
org.jruby.runtime.CallSite$InlineCachingCallSite.call(CallSite.java:279)
at
org.jruby.evaluator.ASTInterpreter.vcallNode(ASTInterpreter.java:1766)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:486)
at org.jruby.evaluator.ASTInterpreter.blockNode(ASTInterpreter.java:606)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:304)
at
org.jruby.evaluator.ASTInterpreter.rescueNode(ASTInterpreter.java:1537)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:454)
at org.jruby.evaluator.ASTInterpreter.blockNode(ASTInterpreter.java:606)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:304)
at org.jruby.evaluator.ASTInterpreter.eval(ASTInterpreter.java:170)
at org.jruby.runtime.InterpretedBlock.yield(InterpretedBlock.java:150)
at org.jruby.runtime.Block.yield(Block.java:114)
at
org.jruby.evaluator.ASTInterpreter.yieldNode(ASTInterpreter.java:1835)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:495)
at
org.jruby.evaluator.ASTInterpreter.ensureNode(ASTInterpreter.java:1070)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:350)
at org.jruby.evaluator.ASTInterpreter.blockNode(ASTInterpreter.java:606)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:304)
at org.jruby.evaluator.ASTInterpreter.eval(ASTInterpreter.java:170)
at
org.jruby.internal.runtime.methods.DefaultMethod.interpretedCall(DefaultMethod.java:174)
at
org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:150)
at
org.jruby.runtime.CallSite$InlineCachingCallSite.call(CallSite.java:259)
at
org.jruby.evaluator.ASTInterpreter.fCallNode(ASTInterpreter.java:1125)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:356)
at org.jruby.evaluator.ASTInterpreter.eval(ASTInterpreter.java:170)
at org.jruby.runtime.InterpretedBlock.yield(InterpretedBlock.java:150)
at org.jruby.runtime.Block.yield(Block.java:114)
at
org.jruby.evaluator.ASTInterpreter.yieldNode(ASTInterpreter.java:1835)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:495)
at org.jruby.evaluator.ASTInterpreter.blockNode(ASTInterpreter.java:606)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:304)
at
org.jruby.evaluator.ASTInterpreter.rescueNode(ASTInterpreter.java:1537)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:454)
at org.jruby.evaluator.ASTInterpreter.eval(ASTInterpreter.java:170)
at org.jruby.runtime.InterpretedBlock.yield(InterpretedBlock.java:150)
at org.jruby.runtime.InterpretedBlock.yield(InterpretedBlock.java:115)
at org.jruby.runtime.Block.yield(Block.java:109)
at org.jruby.RubyKernel.loop(RubyKernel.java:1002)
at org.jruby.RubyKernelInvoker$loop_s_method_0_0.call(Unknown Source)
at
org.jruby.internal.runtime.methods.JavaMethod$JavaMethodZeroBlock.call(JavaMethod.java:223)
at
org.jruby.runtime.CallSite$InlineCachingCallSite.cacheAndCall(CallSite.java:91)
at
org.jruby.runtime.CallSite$InlineCachingCallSite.call(CallSite.java:262)
at
org.jruby.evaluator.ASTInterpreter.fCallNode(ASTInterpreter.java:1125)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:356)
at org.jruby.evaluator.ASTInterpreter.eval(ASTInterpreter.java:170)
at org.jruby.runtime.InterpretedBlock.yield(InterpretedBlock.java:150)
at org.jruby.runtime.InterpretedBlock.yield(InterpretedBlock.java:115)
at org.jruby.runtime.Block.yield(Block.java:109)
at org.jruby.RubyKernel.rbCatch(RubyKernel.java:842)
at org.jruby.RubyKernelInvoker$rbCatch_s_method_1_0.call(Unknown Source)
at
org.jruby.internal.runtime.methods.JavaMethod$JavaMethodOneBlock.call(JavaMethod.java:325)
at
org.jruby.runtime.CallSite$InlineCachingCallSite.cacheAndCall(CallSite.java:91)
at
org.jruby.runtime.CallSite$InlineCachingCallSite.call(CallSite.java:262)
at
org.jruby.evaluator.ASTInterpreter.fCallNode(ASTInterpreter.java:1125)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:356)
at org.jruby.evaluator.ASTInterpreter.blockNode(ASTInterpreter.java:606)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:304)
at org.jruby.evaluator.ASTInterpreter.eval(ASTInterpreter.java:170)
at
org.jruby.internal.runtime.methods.DefaultMethod.interpretedCall(DefaultMethod.java:174)
at
org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:150)
at
org.jruby.runtime.CallSite$InlineCachingCallSite.cacheAndCall(CallSite.java:91)
at
org.jruby.runtime.CallSite$InlineCachingCallSite.call(CallSite.java:262)
at org.jruby.evaluator.ASTInterpreter.callNode(ASTInterpreter.java:661)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:310)
at org.jruby.evaluator.ASTInterpreter.blockNode(ASTInterpreter.java:606)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:304)
at org.jruby.evaluator.ASTInterpreter.eval(ASTInterpreter.java:170)
at
org.jruby.internal.runtime.methods.DefaultMethod.interpretedCall(DefaultMethod.java:174)
at
org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:150)
at
org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:204)
at
org.jruby.runtime.CallSite$InlineCachingCallSite.cacheAndCall(CallSite.java:106)
at
org.jruby.runtime.CallSite$InlineCachingCallSite.call(CallSite.java:248)
at org.jruby.evaluator.ASTInterpreter.callNode(ASTInterpreter.java:656)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:310)
at org.jruby.evaluator.ASTInterpreter.eval(ASTInterpreter.java:170)
at org.jruby.runtime.InterpretedBlock.yield(InterpretedBlock.java:150)
at org.jruby.runtime.InterpretedBlock.yield(InterpretedBlock.java:115)
at org.jruby.runtime.Block.yield(Block.java:109)
at org.jruby.RubyKernel.rbCatch(RubyKernel.java:842)
at org.jruby.RubyKernelInvoker$rbCatch_s_method_1_0.call(Unknown Source)
at
org.jruby.internal.runtime.methods.JavaMethod$JavaMethodOneBlock.call(JavaMethod.java:325)
at
org.jruby.runtime.CallSite$InlineCachingCallSite.cacheAndCall(CallSite.java:91)
at
org.jruby.runtime.CallSite$InlineCachingCallSite.call(CallSite.java:262)
at
org.jruby.evaluator.ASTInterpreter.fCallNode(ASTInterpreter.java:1125)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:356)
at org.jruby.evaluator.ASTInterpreter.blockNode(ASTInterpreter.java:606)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:304)
at org.jruby.evaluator.ASTInterpreter.eval(ASTInterpreter.java:170)
at
org.jruby.internal.runtime.methods.DefaultMethod.interpretedCall(DefaultMethod.java:174)
at
org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:150)
at
org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:267)
at
org.jruby.runtime.CallSite$InlineCachingCallSite.cacheAndCall(CallSite.java:151)
at
org.jruby.runtime.CallSite$InlineCachingCallSite.call(CallSite.java:316)
at
ruby.Users.light.dev.oss.jruby.trunk.jruby.bin.jirb.__file__(/Users/light/oss_projects/jruby/trunk/jruby/bin/jirb:19)
at
ruby.Users.light.dev.oss.jruby.trunk.jruby.bin.jirb.load(/Users/light/oss_projects/jruby/trunk/jruby/bin/jirb)
at org.jruby.Ruby.runScript(Ruby.java:512)
at org.jruby.Ruby.runNormally(Ruby.java:432)
at org.jruby.Ruby.runFromMain(Ruby.java:312)
at org.jruby.Main.run(Main.java:144)
at org.jruby.Main.run(Main.java:89)
at org.jruby.Main.main(Main.java:80)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.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