From: Robert Klemme Date: 2007-03-16T00:45:09+09:00 Subject: Re: freeze string fails to freeze ??? On 15.03.2007 16:33, jwaala.amplify@gmail.com wrote: >>> a='asdf' > => "asdf" >>> a.freeze > => "asdf" >>> a='qwer' > => "qwer" > > should'nt that throw and exception ??? No, the *object* is frozen. This has no effects on the *variable*. >> a='asdf' => "asdf" >> a.freeze => "asdf" >> a << "foo" TypeError: can't modify frozen string from (irb):4:in `<<' from (irb):4 from :0 Kind regards robert