From: "Hal E. Fulton" Date: 2002-09-10T12:57:23+09:00 Subject: Re: Larry Wall's comments on Ruby ----- Original Message ----- From: "Reimer Behrends" Newsgroups: comp.lang.ruby To: "ruby-talk ML" Sent: Monday, September 09, 2002 10:53 PM Subject: Re: Larry Wall's comments on Ruby > Hal E. Fulton (hal9000@hypermetrics.com) wrote: > [...] > > It should be possible to write a little module to mix > > in methods into Numeric (I suppose) which would do the > > same thing. > > class Numeric > [:sin, :cos, :tan, :log, :log10, :exp, :sqrt].each do > | meth | > module_eval <<-EOF > def #{meth} > Math.#{meth}(self) > end > EOF > end > end > > Personally, I still prefer the traditional function notation. Yeah... what he said. :) Hmm, ten lines exactly. Thanks... Hal