# Change in semantics on multiple values

**URL:** <https://rubytalk.org/t/change-in-semantics-on-multiple-values/10805>\
**Category:** ruby-talk\
**Created:** [30 March 2004 08:09 UTC](https://rubytalk.org/t/change-in-semantics-on-multiple-values/10805 "2004-03-30T08:09:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Greg\_McIntyre2](https://avatars.discourse-cdn.com/v4/letter/g/9f8e36/32.png) [@Greg\_McIntyre2](https://rubytalk.org/u/Greg_McIntyre2)\
**Post date:** [30 March 2004 08:09 UTC](https://rubytalk.org/t/change-in-semantics-on-multiple-values/10805/1 "2004-03-30T08:09:30Z")

</div>

I noticed this here: [http://www.rubygarden.org/ruby?Rite](http://www.rubygarden.org/ruby?Rite)

```
a, b, c = x
# where x = [1,2,3]
# should they be:
# a=1,b=2,c=3
# or:
# a=[1,2,3],b=nil, c=nil

```

Matz still hasn’t decided, but it will be either:

Represent multiple values by subclass of Array, say Array::Values\<Array  
or  
Separating arrays and multiple values strictly in syntax

What about the syntax:

a, b, c = \*x

# a=1,b=2,c=3

a, b, c = x

# a=[1,2,3],b=nil,c=nil

or

a, b, c = \*x

# a=1,b=2,c=3

a, b, c = x

# Raises an argument count mismatch type exception

They are what would make sense to me.

Greg McIntyre

---

<div class="post-metadata">

**Author:** ![Yukihiro\_Matsumoto2](https://avatars.discourse-cdn.com/v4/letter/y/b9e5f3/32.png) [@Yukihiro\_Matsumoto2](https://rubytalk.org/u/Yukihiro_Matsumoto2)\
**Post date:** [30 March 2004 08:47 UTC](https://rubytalk.org/t/change-in-semantics-on-multiple-values/10805/2 "2004-03-30T08:47:46Z")

</div>

Hi,

> **···**
>
> In message “Change in semantics on multiple values” on 04/03/30, Greg McIntyre [puyo@optushome.com.au](mailto:puyo@optushome.com.au) writes:
> 
> > What about the syntax:
> > 
> > a, b, c = \*x
> > 
> > # a=1,b=2,c=3
> > 
> > a, b, c = x
> > 
> > # a=[1,2,3],b=nil,c=nil
> > 
> > or
> > 
> > a, b, c = \*x
> > 
> > # a=1,b=2,c=3
> > 
> > a, b, c = x
> > 
> > # Raises an argument count mismatch type exception
> > 
> > They are what would make sense to me.
> 
> The former.
> 
> ```
> matz.
> 
> ```
