Hi --

On Sat, 17 Feb 2007, hemant wrote:

> Take a look at these
>
>>> instruments = {'trombones' => 1, 'clarinets' => 2}
>>> p instruments.to_a
> [["trombones", 1], ["clarinets", 2]]
>>> p *instruments
> ["trombones", 1]
> ["clarinets", 2]
>
> Normally * uses to_a or to_ary, but certainly its more devious than it
> appears. And where exactly is this operator defined in ruby source
> tree? eval.c ?

I'm not sure I'm seeing what you're getting at in your example.  Isn't
that what you'd expect it to do?


David

-- 
Q. What is THE Ruby book for Rails developers?
A. RUBY FOR RAILS by David A. Black (http://www.manning.com/black)
    (See what readers are saying!  http://www.rubypal.com/r4rrevs.pdf)
Q. Where can I get Ruby/Rails on-site training, consulting, coaching?
A. Ruby Power and Light, LLC (http://www.rubypal.com)