From: "Jesús Gabriel y Galán" Date: 2010-10-15T00:10:56+09:00 Subject: Re: Freeze method doesn't work On Thu, Oct 14, 2010 at 5:00 PM, Sergey U. <2ys.pro@gmail.com> wrote: > Freeze should prevent further modifications to 'var'... > > mac-undrgrnd:~ yspro$ irb > ruby-1.9.2-p0 > var = 4 >  => 4 > ruby-1.9.2-p0 > var.frozen? >  => false > ruby-1.9.2-p0 > var.freeze >  => 4 > ruby-1.9.2-p0 > var.frozen? >  => true > ruby-1.9.2-p0 > var = 5 >  => 5 > ruby-1.9.2-p0 > var.frozen? >  => false > ruby-1.9.2-p0 > > > What's wrong? Variables reference objects. It's the object you can freeze, not the variable. If you make the variable point to a different object, the original one is still frozen, but the new one maybe not. Jesus.