From: "Brian Schröder" Date: 2004-12-01T06:45:49+09:00 Subject: Re: Unpacking an array with the star operator Thanks for the answers. I again learned something new. I didn't knew that each enumerable could be "unstarred". Regards, Brian On Wed, 1 Dec 2004 01:52:48 +0900 "Robert Klemme" wrote: > 17:46:05 [robert.klemme]: irbs > >> class Foo > >> include Enumerable > >> def each() yield "foo" end > >> end > => nil > >> Foo.new.to_a > => ["foo"] > >> a,b=*Foo.new > => ["foo"] > >> a > => "foo" > >> b > => nil > >> a,b=Foo.new > => [#] > >> a > => # > >> b > => nil -- Brian Schr�der http://www.brian-schroeder.de/