From: Joel VanderWerf Date: 2009-02-16T04:15:58+09:00 Subject: [ruby-core:22154] Re: [Patch 191p0 ] for ostruct freeze behavior Robert Dober wrote: > Please find attached a patch for ostruct to behave frozen for already > created accessors and not only for new ones. Can you delegate #freeze to the @table, or is it more complicated? --- ostruct.rb 2007-02-12 15:01:19.000000000 -0800 +++ - 2009-02-15 11:15:57.155518675 -0800 @@ -66,6 +66,11 @@ @table = x @table.each_key{|key| new_ostruct_member(key)} end + + def freeze + @table.freeze + super + end def new_ostruct_member(name) name = name.to_sym -- vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407