From: Charles Steinman Date: 2005-05-26T07:30:19+09:00 Subject: Re: Zerofy aartist wrote: > I still like to make zerofy working, just to understand the concepts. That method works for me. irb(main):002:0> class Fixnum irb(main):003:1> def zerofy! irb(main):004:2> self < 10 ? '0' + self.to_s : self.to_s irb(main):005:2> end irb(main):006:1> end => nil irb(main):007:0> 5.zerofy! => "05" So I don't think your problem was where you think it is. By the way, just as a point of style, since this isn't changing the Fixnum or doing anything out the the ordinary really, I don't think the method ought to have a bang on the end.