On Jan 5, 2008, at 10:15 AM, Jason Roelofs wrote:

> Welcome to Monkey Patching! This is how ActiveResource gives you  
> things
> like:
>
> 4.days.ago
>
> "some string".underscore
>
> and the like.
>
> It's one of the many things that makes Ruby code very fun to write

Actually it is a bit different.  Monkey patching is just adding
methods to classes. Fixnum and String in your examples.

Instance variables on Fixnums (or Symbols or Nil) is different.
It is a good example of uniformity in Ruby but I'm hard pressed
to think of a nice use case for the feature.

Gary Wright