aartist wrote:
> Markus, , you are right on the point.
>
> month = 5
> month.zerofy!
> puts month.class  =>String
> puts month           => 05
>
> Is it not possible?
> I am newbie in Ruby, but I am interested in that heavy juju, you
> mentioned.
>
> ri Fixnum : gives me  two important thing.
> A. Fixnum objects have immediate value
> B. You cannot add a singleton method.
>
> I would like to know, if you can add destructive method  to Fixnum
> objects..

You really don't want to do that. You would be changing the meaning of
the number 5 for every operation afterward. You'd see cases like this:

(begin mock code)
month = 5  #=> 5
month.zerofy! #=> "05"
Timmy.age = 5 #=> "05"
#It's Timmy's birthday!
Timmy.age += 1 #ERROR! You can't add 1 to a String, which is what
zerofy! turned 5 into
(end mock code)

Keep in mind that methods do not operate on the variables you use to
call them. Variables are just references to objects, any several can
refer to the same object. Every call to the number 5 goes to the same
Fixnum object. Besides it being incredibly evil (in the Evil Ruby
sense) to transform an object into one of a completely different type,
doing so to the number 5 is a particularly diabolical concept.

What you want to do is just this, I think:

month = month.zerofy