obj.send :binding does not set the binding's 'self' to obj
----------------------------------------------------------
Key: JRUBY-3131
URL: http://jira.codehaus.org/browse/JRUBY-3131
Project: JRuby
Issue Type: Bug
Components: Core Classes/Modules
Affects Versions: JRuby 1.1.5
Reporter: Charles Oliver Nutter
Priority: Blocker
Fix For: JRuby 1.1.6
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:
{noformat}
class Foo
def foo
puts 'here'
end
end
eval 'foo', Foo.new.send(:binding)
{noformat}
This breaks templater gem, which is used for many things in merb.
--
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