Forum: Ruby Re: final/closed classes in Ruby (was: Sharp knives and glue

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Berger, Daniel (Guest)
on 2006-05-12 01:47
(Received via mailing list)
> -----Original Message-----
> From: Gregory S. [mailto:removed_email_address@domain.invalid]
> Sent: Thursday, May 11, 2006 3:39 PM
> To: ruby-talk ML
> Subject: Re: final/closed classes in Ruby (was: Sharp knives and glue)


> class Foo
>   def test
>     puts "hello"
>   end
>   freeze #this already exists and does what you want
> end

Well, I'll be damned.  I didn't know you could do that.  You learn
something knew every day I guess. :)

Doesn't prevent subclassing though. :)



This communication is the property of Qwest and may contain confidential
privileged information. Unauthorized use of this communication is
prohibited and may be unlawful.  If you have received this communication
in error, please immediately notify the sender by reply e-mail and
all copies of the communication and any attachments.
Tanner B. (Guest)
on 2006-05-12 01:50
(Received via mailing list)
On 5/11/06, Berger, Daniel <removed_email_address@domain.invalid> wrote:
> >   def test
> Thanks,
> Dan

But any solution you can put into place with pure ruby, can be
just as easily. :)
This topic is locked and can not be replied to.