Announcement (2017-05-07): www.ruby-forum.com is now read-only since I
unfortunately do not have the time to support and maintain the forum any
more. Please see rubyonrails.org/community and ruby-lang.org/en/community
for other Rails- und Ruby-related community platforms.

Ronald Fischer wrote:
> Below is a code snippet which gives me some headache:>> def headache> yield(*(foo(1)),"bar")> end
You can't use a 'splatted' array anywhere in a method call except at the
end:
def foo(a, b, c)
p [a, b, c]
end
foo(1, 2, *[3]) #=> works
foo(1, *[3], "asdf") #=> doesn't work
I'm not quite sure why this should be, since it has an unambiguous
meaning, unlike defining a method with a splat in the middle of the
arguments:
def bar(a, *b, c=0)
...
end
The splat operator is a bit mysterious to me in this regard.....
best,
Dan