You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When we undefine a method it causes Truffle's respond_to? logic to fail. respond_to? is implemented to return false if a method lookup fails, but if the lookup succeeds but is marked as undefined, Truffle raises an exception instead.
A small reproduction case:
class Wrapper
def x
end
def y
p respond_to?(:x)
singleton_class.send(:undef_method, :x)
p respond_to?(:x)
end
end
Wrapper.new.y
When we undefine a method it causes Truffle's
respond_to?
logic to fail.respond_to?
is implemented to return false if a method lookup fails, but if the lookup succeeds but is marked as undefined, Truffle raises an exception instead.A small reproduction case:
And running in MRI:
Running in JRuby+Truffle:
The raise originates in:
jruby/truffle/src/main/java/org/jruby/truffle/nodes/dispatch/DispatchNode.java
Lines 96 to 98 in 55376a0
The text was updated successfully, but these errors were encountered: