./t.rb:2:in `<class:B>': wrong argument type UnboundMethod (expected Proc) (TypeError)
from ./t.rb:1:in `<main>'
JRuby:
RubyClass$INVOKER$i$newInstance.gen:-1:in `call': java.lang.NullPointerException
from RubyMethod.java:194:in `call'
from CompiledBlock19.java:158:in `yield'
from CompiledBlock19.java:87:in `call'
from Block.java:106:in `call'
from RubyProc.java:301:in `call'
from ProcMethod.java:64:in `call'
from DynamicMethod.java:202:in `call'
from DynamicMethod.java:198:in `call'
from CachingCallSite.java:297:in `cacheAndCall'
from CachingCallSite.java:135:in `call'
from ./t.rb:-1:in `invokeOther2:new'
from ./t.rb:5:in `__script__'
from MethodHandle.java:636:in `invokeWithArguments'
from Compiler.java:112:in `load'
from Ruby.java:811:in `runScript'
from Ruby.java:804:in `runScript'
from Ruby.java:755:in `runNormally'
from Ruby.java:565:in `runFromMain'
from Main.java:405:in `doRunFromMain'
from Main.java:300:in `internalRun'
from Main.java:227:in `run'
from Main.java:199:in `main'
The text was updated successfully, but these errors were encountered:
Just a note this is broken on 1.7 and master. The error above is a mild red herring in that the error message we should throw happens in evaluating define_singleton_method and this stack is us trying to execute the method we erroneously added (by calling B.new after this class body)
=== 2.7.10 / 2019-06-14
Minor enhancements:
* Fix bundler rubygems binstub not properly looking for bundler. Pull request #2426
by David Rodríguez.
* [BudlerVersionFinder] set .filter! and .compatible? to match only on major versions.
Pull request #2515 by Colby Swandale.
+ Update for compatibilty with new minitest. Pull request #2118 by MSP-Greg.
Stumbled upon this earlier when I used
define_singleton_method
incorrectly.Code:
MRI:
JRuby:
The text was updated successfully, but these errors were encountered: