From: ES Date: 2005-05-28T03:42:48+09:00 Subject: Re: A different perspective on Ruby. Le 27/5/2005, "Jonas Hartmann" a �crit: >Gene Tani wrote: >> The rant-writer likes ruby. From his python rant: >> ===========8< >> Though, I must admit, Python has the least inconsistencies of any >> language I've ever used, excepting maybe Ruby. > >actually he seems to like both languages cause in the ruby rant he >refers to python and in the python rant he refers to ruby. > >his choice of language is bad, some examples are stupid, and even me, >being quite a newbish, wonders why he rants about that, but some >examples are really good. > >btw. isnt there a way to extend integer, fixnum and bignum with .sqrt ? > >(just adding the method .sqrt arg, that again runs the sqrt method >which is possibly part of Kernel or Object, I am just guessing - is >that right?) Yes, I already posted this. Something like this is all that is needed (untested): # Slightly more robust class Numeric alias_method :_old_mm, :method_missing def method_missing(symbol, *args, &block) Math.send symbol, self, *args, &block rescue NoMethodError _old_mm symbol, *args, &block end # method_missing end # Numeric >greetings > > Jonas E -- template void quack(duck& d) { d.quack(); }