Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Blocker
-
Resolution: Fixed
-
Affects Version/s: JRuby 1.1.5
-
Fix Version/s: JRuby 1.1.6
-
Component/s: Core Classes/Modules
-
Labels:None
-
Number of attachments :
Description
This is a regression due to binding fixes/improvements in 1.1.5. Basically, because we no longer stand up a full frame for invoking "binding", the self is now the caller, rather than the callee. Since binding is private, caller usually is callee; but in a case found in the templater gem, caller is different (using send :binding). Here's a trivial reproduction:
class Foo
def foo
puts 'here'
end
end
eval 'foo', Foo.new.send(:binding)
This breaks templater gem, which is used for many things in merb.
This turned out not to be "too" hard to fix, so I added a test and fixed it. I also split "binding" behavior between 1.8 and 1.9, since it's an obvious difference right now. But I'm not sure I'd make similar changes in the future.