On Aug 22, 2010, at 18:02 , Rob Biedenharn wrote: > > Or even Numeric: > > irb> 1.class.ancestors > => [Fixnum, Integer, Numeric, Comparable, Object, Kernel, BasicObject] > irb> class Numeric > irb> def percent > irb> self.to_f / 100.0 > irb> end > irb> end > => nil > irb> 5.percent > => 0.05 > irb> 125.percent > => 1.25 > irb> 14.7.percent > => 0.147 > irb> (99+"44/100".to_r).percent > => 0.9944 I said Integer because of how the original problem was described. I thought about floats and decided quickly that it didn't make sense... but looking at your examples above, that actually works and reads pretty well.