From: Christoph Date: 2005-03-30T08:24:31+09:00 Subject: Re: Modifying boolean values Florian Gross schrieb: > > Unfortunately, there isn't in standard Ruby. > > The feature would as well be useful for doing full object proxies > (WeakRefs to false or nil currently misbehave). > > I suppose that you might be able to get this changed in standard Ruby > if you find that the slowdown caused by changing the RTEST() macro is > not too high. But I'm not sure if it is like that. Perhaps you could > also special case true, false and nil so that they would not go > through the RTEST() method call -- after all you already have one of > those values in most cases. > > You can get an idea about the performance penalties from my implementation using "false" flags, akin to frozen and tainted flags. www.ruby-talk.org/cgi-bin/scat.rb/ruby/ruby-core/279 /Christoph