# Syntax error with array interpolation

**URL:** <https://www.ruby-forum.com/t/syntax-error-with-array-interpolation/107706>\
**Category:** Ruby\
**Created:** [June 25, 2007, 4:36pm UTC](https://www.ruby-forum.com/t/syntax-error-with-array-interpolation/107706 "2007-06-25T16:36:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ronaldfischer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/67e7ee/32.png) [@ronaldfischer](https://www.ruby-forum.com/u/ronaldfischer)\
**Post date:** [June 25, 2007, 4:36pm UTC](https://www.ruby-forum.com/t/syntax-error-with-array-interpolation/107706/1 "2007-06-25T16:36:57Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![ronaldfischer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/67e7ee/32.png) [@ronaldfischer](https://www.ruby-forum.com/u/ronaldfischer)\
**Post date:** [June 25, 2007, 5:03pm UTC](https://www.ruby-forum.com/t/syntax-error-with-array-interpolation/107706/2 "2007-06-25T17:03:27Z")

</div>

Hi,

In message “Re: Syntax error with array interpolation”  
on Mon, 25 Jun 2007 23:35:11 +0900, “Ronald F.”  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) 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.

```
