Forum: Ruby Syntax error with array interpolation

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
C667185722eaecf12461cb423dc8b410?d=identicon&s=25 Ronald Fischer (Guest)
on 2007-06-25 16:36
(Received via mailing list)
Below is a code snippet which gives me some headache:

def headache

def foo(n)

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
0ec4920185b657a03edf01fff96b4e9b?d=identicon&s=25 Yukihiro Matsumoto (Guest)
on 2007-06-25 17:03
(Received via mailing list)

In message "Re: Syntax error with array interpolation"
    on Mon, 25 Jun 2007 23:35:11 +0900, "Ronald Fischer"
<> 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.

This topic is locked and can not be replied to.