Hi --

Looking at:

ruby 1.9.0 (2008-02-26 revision 15615) [i686-darwin9.2.0]

The * operator is tied to to_a, but there's no default to_a anymore,
but * works even without to_a.

irb(main):002:0> obj = Object.new
=> #<Object:0x3cb748>
irb(main):003:0> obj.to_a
NoMethodError: undefined method `to_a' for #<Object:0x3cb748>
irb(main):004:0> [*obj]
=> [#<Object:0x3cb748>]

Am I right in interpreting this to mean that * works by doing an
implicit to_a-ish operation, unless to_a is defined in which case it
uses to_a? (I was kind of expect it not to work in the absence of the
default to_a, though I'm happy if it does.)


David

-- 
Upcoming Rails training from David A. Black and Ruby Power and Light:
   ADVANCING WITH RAILS, April 14-17 2008, New York City
   CORE RAILS, June 24-27 2008, London (Skills Matter)
See http://www.rubypal.com for details. Berlin dates coming soon!