Re.Mark

My Life As A Blog

Ruby Tuesday #20 : Prevent monkeypatching

leave a comment »

Monkeypatching is the practice of redefining methods in classes at runtime.  According to this Wikipedia article, the exact definition varies between the Ruby and Python communities.  Some think it’s a good thing, while others take a different view.  If you want to prevent it from happening, here’s an answer : make methods immutable.

Advertisements

Written by remark

September 30, 2008 at 7:47 pm

Posted in Design, Ruby

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: