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

**URL:** <https://www.ruby-forum.com/t/re-final-closed-classes-in-ruby-was-sharp-knives-and-glue/94718>\
**Category:** Ruby\
**Created:** [May 11, 2006, 11:59pm UTC](https://www.ruby-forum.com/t/re-final-closed-classes-in-ruby-was-sharp-knives-and-glue/94718 "2006-05-11T23:59:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![BergerS\_Daniel](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/bc8723/32.png) [@BergerS\_Daniel](https://www.ruby-forum.com/u/BergerS_Daniel)\
**Post date:** [May 11, 2006, 11:59pm UTC](https://www.ruby-forum.com/t/re-final-closed-classes-in-ruby-was-sharp-knives-and-glue/94718/1 "2006-05-11T23:59:35Z")

</div>

> -----Original Message-----  
> From: Tanner B. [[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)]  
> Sent: Thursday, May 11, 2006 3:50 PM  
> To: ruby-talk ML  
> Subject: Re: final/closed classes in Ruby (was: Sharp knives and glue)

> But any solution you can put into place with pure ruby, can  
> be circumvented just as easily. 🙂

True, but if someone goes out of their way to circumvent your protection  
mechanisms, the egg is entirely on their face if something goes wrong as  
a result. I consider things like private, protected, etc, to be  
advisory, not absolute. You break it, you bought it, and all that.

You can circumvent such constructs in other languages as well. Consider  
‘#define private public’. \>:)

Regards,

Dan

This communication is the property of Qwest and may contain confidential  
or  
privileged information. Unauthorized use of this communication is  
strictly  
prohibited and may be unlawful. If you have received this communication  
in error, please immediately notify the sender by reply e-mail and  
destroy  
all copies of the communication and any attachments.

---

<div class="post-metadata">

**Author:** ![BergerS\_Daniel](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/bc8723/32.png) [@BergerS\_Daniel](https://www.ruby-forum.com/u/BergerS_Daniel)\
**Post date:** [May 12, 2006, 12:08am UTC](https://www.ruby-forum.com/t/re-final-closed-classes-in-ruby-was-sharp-knives-and-glue/94718/2 "2006-05-12T00:08:42Z")

</div>

On May 11, 2006, at 4:58 PM, Berger, Daniel wrote:

> ‘#define private public’. \>:)

Arguably, that is not C but a preprocessor macro. The same thing  
could be done by including Ruby code and preprocessing using a Ruby  
script (interesting…).

---

<div class="post-metadata">

**Author:** ![BergerS\_Daniel](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/bc8723/32.png) [@BergerS\_Daniel](https://www.ruby-forum.com/u/BergerS_Daniel)\
**Post date:** [May 12, 2006, 1:19pm UTC](https://www.ruby-forum.com/t/re-final-closed-classes-in-ruby-was-sharp-knives-and-glue/94718/3 "2006-05-12T13:19:21Z")

</div>

“Berger, Daniel” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) writes:

> You can circumvent such constructs in other languages as well. Consider  
> ‘#define private public’. \>:)

IIRC, they found that in early OpenOffice header files. 😉
