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
I expect it to print "All OK" (that's MRI behaviour).
Actual Behavior
NoMethodError: undefined method `deep_dup' for {:id=>1, :data=>{:name=>"John"}}:Hash
block in deep_dup at refinement_bug.rb:6
each at org/jruby/RubyHash.java:1343
each_with_object at org/jruby/RubyEnumerable.java:1077
deep_dup at refinement_bug.rb:4
run at refinement_bug.rb:28
<main> at refinement_bug.rb:32
The text was updated successfully, but these errors were encountered:
UPD: Adding using self right after refine ... do .. end make it work as expected (though it looks strange–refinements should only affect everything belowusing).
In JRuby we use the presence of a call to "using" to flip on refinement mode for a given scope, so we're not checking for refinements all the time. We should probably be doing the same thing for the block passed to refine. cc @enebo
Environment
Expected Behavior
Given a simple script:
I expect it to print
"All OK"
(that's MRI behaviour).Actual Behavior
The text was updated successfully, but these errors were encountered: