From: Josh Cheek Date: 2012-02-10T10:17:18+09:00 Subject: Re: Bizarre array literal? --e89a8f642daa9aab3804b891e3be Content-Type: text/plain; charset=ISO-8859-1 On Thu, Feb 9, 2012 at 7:03 PM, Daniel Waite wrote: > ruby-1.8.7-p174 :001 > SOMETHING = 2355, SOMETHING2 = 3453 > => [2355, 3453] > > Why? > > Because of how multiple assignment and destructuring work, the RHS will be treated like an array a = 1, 2 # => [1, 2] Now this particular assignment has an assignment in the RHS, which is treated like this. SOMETHING = 2355, SOMETHING2 = 3453 SOMETHING = 2355, (SOMETHING2 = 3453) SOMETHING = 2355, 3453 For correct multiple assignment, it would be SOMETHING, SOMETHING2 = 2355, 3453 --e89a8f642daa9aab3804b891e3be--