From: Austin Ziegler Date: 2002-10-15T02:11:52+09:00 Subject: Re: final in ruby On Tue, 15 Oct 2002 02:05:04 +0900, ts wrote: >> >> >> "K" == Kontra, Gergely writes: > K> Because I want to protect everyone (including myself) to > K> overwrite some methods of my object. > Freeze your class > > pigeon% ruby -e 'class A; def a() end end; A.freeze;class A; def a() end end' > -e:1: can't modify frozen class (TypeError) > pigeon% I think that what he's wanting to do is freeze a method, not a whole class... -austin -- Austin Ziegler, austin@halostatue.ca on 2002.10.14 at 13.10.54