From: Tim X Date: 2007-01-12T07:30:05+09:00 Subject: Re: Why is there a seperate Math class? Ma谷l Cl辿rambault writes: > Let me try to make everybody happy : > > class Numeric > Math.methods(false).each { |m| > sm = Math.method(m) > if Math.method(m).arity == 1 > define_method m do > sm.call self > end > end > } > end > > irb(main):001:0> require 'math_extend' > => true > irb(main):002:0> 34.cos > => -0.848570274784605 > irb(main):003:0> Math.cos 34 > => -0.848570274784605 > > Regards, > Ma谷l Cl辿rambault > You gotta love it! A language which really does allow you to easily modify it to what you want it to look like and fit with houw yo want to think about the problem. Now nobody is right or wrong - its just a question of taste and individual thinking style. Tim -- tcross (at) rapttech dot com dot au