----- Original Message ----- 
From: "Reimer Behrends" <behrends / cse.msu.edu>
Newsgroups: comp.lang.ruby
To: "ruby-talk ML" <ruby-talk / ruby-lang.org>
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