Syntax error with array interpolation

Below is a code snippet which gives me some headache:

def headache
yield(*(foo(1)),“bar”)
end

def foo(n)
[n,n+2,n+5]
end

headache { |a,b,c,d| puts a.to_s; puts b.to_s; puts c.to_s; puts d }

I had expected that this would print

Hi,

In message “Re: Syntax error with array interpolation”
on Mon, 25 Jun 2007 23:35:11 +0900, “Ronald F.”
[email protected] writes:

|Below is a code snippet which gives me some headache:

1.8 allows argument splat (*) only at the end of argument list.
Wait for 1.9.

          matz.