Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
comp.lang.ruby
Re: string freeze
Harry
4/24/2007 1:05:00 AM
On 4/24/07, Stephen Smith <4fires@gmail.com> wrote:
> Hey all,
>
> So I'm trying to freeze a class variable, and I discover that Object#freeze
> breaks down every time on my machine. Even with simple strings.
>
>
> fiery
>
Try altering it instead of reassigning it.
I think this is a little more like what you expected.
Not exactly, but you can see freezing.
test = "good"
p test
test.freeze
p test
p test.frozen?
test << "bad"
p test
p test.frozen?
Harry
--
http://www.kakueki.com/ruby...
A Look into Japanese Ruby List in English
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
Re: string freeze
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password