From: Glenn Parker Date: 2005-06-02T22:37:01+09:00 Subject: Re: binding, ObjectSpace._id2ref [WAS] Re: [ANN] parseargs-0.0.0 Jim Weirich wrote: > Actually, you don't even have to actually assign anything to y, you just > need to make sure that the Ruby interpreter sees an assignment to y before > the print. It's a subtle distinction, but consider the following code: > > eval "y = 2" > y = 0 if false > puts y # => 2 (not 0) OK, but you have to admit that "y = 0 if false" is Dark Magic. Who is going to understand what is going on there? An optimizing interpreter might justifiably toss the entire statement. -- Glenn Parker | glenn.parker-AT-comcast.net |