From: Curt Hagenlocher Date: 2008-10-10T00:20:01+09:00 Subject: [ruby-core:19246] Re: Module.freeze vs Object.freeze Yukihiro Matsumoto [mailto:matz@ruby-lang.org] writes: > It initializes internal name field before freezing it. The following > code will show the difference: > # comment out the following line to see the difference. > Module.send :remove_method, :freeze > m = Module.new > m.freeze > M = m > p m Thanks, but I don't see any difference in 1.8.6 (patchlevel 111). Is this something that has changed in 1.8.7 or 1.9? C:\dd\vsl_dynamic_2\src\Merlin\Main\Hosts\IronRails>irb irb(main):001:0> m = Module.new => # irb(main):002:0> m.freeze => # irb(main):003:0> M = m => M irb(main):004:0> p m M => nil irb(main):005:0> C:\dd\vsl_dynamic_2\src\Merlin\Main\Hosts\IronRails>irb irb(main):001:0> Module.send :remove_method, :freeze => Module irb(main):002:0> m = Module.new => # irb(main):003:0> m.freeze => # irb(main):004:0> M = m => M irb(main):005:0> p m M => nil irb(main):006:0> -- Curt Hagenlocher curth@microsoft.com