From: Mauricio Fernandez Date: 2006-06-17T04:43:52+09:00 Subject: Re: More rebinding blocks On Sat, Jun 17, 2006 at 04:14:06AM +0900, Sean O'Halpin wrote: > On 6/16/06, Mat Schaffer wrote: > >Can Matz or anyone offer any assurance that that feature of 1.9 will > >survive in later releases? I'd hate to write code that uses it only > >to loose it in a future release. > > I think you can be pretty sure it will survive. You can also find an > implementation by Ara Howard for 1.8 in ruby-talk:156726. There are many implementations around. In addition to the above one, Ara posted another on [[ruby-core:6380]. Both are thread-safe, but will not work in general with frozen objects. They're still better than the one you can find in ActiveSupport, which is not strictly thread-safe (it is in practice, though). I wrote yet another implementation which is thread-safe _and_ works with frozen objects; you can find it at http://eigenclass.org/hiki.rb?instance_exec where I also compare it to some other ones. -- Mauricio Fernandez - http://eigenclass.org - singular Ruby