From: Gary Wright Date: 2008-05-15T04:32:47+09:00 Subject: Re: Array assignment with multiple args On May 14, 2008, at 3:20 PM, Jeff Hales wrote: > Hi all. I'm just starting to learn Ruby and have hit a problem that is > being extremely difficult to find information on. When given a line of > code such as: > > a = "this", b = "that", c = "those" This statement is parsed as: a = [ "this", (b = "that"), (c = "those") ] The right hand side of the assignment to variable 'a' is an array of three items: first item: a string with value "this" second item: a string with value "that" third item: a string with value "those" As a side effect, the variable b is assigned to "that" and the variable c is assigned to "those" The example you gave is pretty unusual. I *think* you were thinking about parallel assignment, which would look like: a, b, c = "this", "that", "those" Gary Wright