From: Macario Ortega Date: 2009-06-03T15:30:29+09:00 Subject: Re: ruby 1.9 splat in return statement, bug or feature? Men thats a real bummer, i love "peeling" arrays like this: a = *[1] #=> 1 a = *[1,2] # => [1,2] Some of my code is gonna break. Yukihiro Matsumoto wrote: > Hi, > > In message "Re: ruby 1.9 splat in return statement, bug or feature?" > on Sat, 17 Feb 2007 12:36:20 +0900, Gary Wright > writes: > > |What's going on with splat in 1.9? > | > |$ ruby -e 'def foo; return *[1]; end; p foo' > |1 > | > |$ ruby-1.9 -e 'def foo; return *[1]; end; p foo' > |[1] > > In 1.9, values (i.e. result of splat) are always represented by array, > so that we won't confuse array as an value with array as values > representation. > > matz. -- Posted via http://www.ruby-forum.com/.