Overriding to_s method of BIgDecimal

I am overriding to_s method of BigDecimal class as below and its working
Wanted to confirm is there any other better way to do this ? Thanks!

49 class BigDecimal
50 alias :old_s :to_s
51 def to_s
52 return to_i.to_s if eql? to_i
53 self.old_s
54 end
55 end

sαη∂ιρ Rαηѕιηg

blog www.funonrails.com
twitter @sandipransing
skype sandip.ransing