From: Ryan Davis Date: 2010-02-24T07:56:21+09:00 Subject: [ruby-core:28321] Re: [Bug #2782] Binding#eval not completely indicative of its binding On Feb 23, 2010, at 05:18 , Thomas Sawyer wrote: > Bug #2782: Binding#eval not completely indicative of its binding > http://redmine.ruby-lang.org/issues/show/2782 > > Author: Thomas Sawyer > Status: Open, Priority: Normal > Category: core > ruby -v: 1.9.1 > > binding.eval("__FILE__") does not return the file from which the binding was created. > > Given the purpose of binding it should hold that: > > __FILE__ == binding.eval("__FILE__") Just my two cents: (yen?) __FILE__ is expanded at parse time directly into the parse tree. As such, it isn't really a variable or a constant, just a placeholder. I don't think it is going to be easy to make it act like a constant for Binding#eval.