From: Joel VanderWerf Date: 2003-07-07T07:24:02+09:00 Subject: Re: Freezing an arbitary object Brian Candler wrote: > - local variables: cannot be frozen, since they don't belong to an object > and are not an object themselves. They can always be reassigned to point > to another object. Sorry, that's a Ruby fact of life. I wonder why this doesn't work? I didn't expect it to, but I'm curious. irb(main):005:0> b = binding # irb(main):006:0> eval "y=1", b 1 irb(main):007:0> eval "y", b 1 irb(main):008:0> b.freeze # irb(main):009:0> eval "y=2", b 2 Would it be useful to be able to freeze the current binding? Disastrous? Inefficient?