[#1026] Is this a bug? — Dave Thomas <Dave@...>

18 messages 2000/01/03

[#1084] Infinite loop — Dave Thomas <Dave@...>

17 messages 2000/01/11

[#1104] The value of while... — Dave Thomas <Dave@...>

24 messages 2000/01/11

[ruby-talk:01149] Re: struct / freeze

From: ts <decoux@...>
Date: 2000-01-16 16:36:10 UTC
List: ruby-talk #1149
>>>>> "Y" == Yukihiro Matsumoto <matz@netlab.co.jp> writes:

Y> Freezing is implemented for arrays, hashes, strings.
Y> Do you need it for structs too?

 I was writing a small extension with a hash, and I don't want that the
 user can accidentally modify the hash (the hash just contain information
 about a random generator : name, seed, number of calls).

 Finally I've switched to a struct (it seems more logical, at least for me)
 and I've found that freeze don't work with struct.

 I was just surprised, and just want to know if there is a reason for this.


Guy Decoux

In This Thread