Bugs item #8679, was opened at 2007-02-15 14:29
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=1698&aid=8679&group_id=426

Category: Core
Group: 1.9.x
Status: Open
Resolution: None
Priority: 3
Submitted By: Gary Wright (gwright)
Assigned to: Nobody (None)
Summary: Unexpected behavior of splat (*) in parallel assignment

Initial Comment:
Ruby 1.9 lifts the restriction that splat must be used on the last item in a list.
It seems like this isn't handled quite right in a parallel assignment context:

irb(main):007:0> a = [1,2]
=> [1, 2]
irb(main):008:0> b = [*a, 3]
=> [1, 2, 3]
irb(main):009:0> x,y,z = [*a, 3]
=> [1, 2, 3]
irb(main):010:0> x,y,z = *a, 3
=> [1, 2]                                              # this is surprising, z is nil instead of 3 at this point
irb(main):011:0> x,y,z = 3, *a
=> [3, 1, 2]



----------------------------------------------------------------------

You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=1698&aid=8679&group_id=426