From: "Anders Engström" Date: 2004-05-10T21:23:55+09:00 Subject: Re: RCR Suggestion: Binding#eval * Bill Atkins : > I propose that the following method be added to Ruby: > > class Binding > def eval str > Kernel.eval str, self > end > end > > This makes eval'ing code in a given binding more OO. So code like > > eval "myvar = 120", binding > > becomes: > > binding.eval "myvar" > > which is more in keeping with the general Ruby way, IMHO. > Agreed - good proposal. That's exactly the way I tried to do it before looking at the rdoc's (element of least surprise). //Anders -- /** * Anders Engstr�m, aengstrom@gnejs.net * ------------------------------------- * Your mind is like an umbrella. * It doesn't work unless you open it. * /Frank Zappa */