Skip to content

Instantly share code, notes, and snippets.

@seawolf
Last active December 19, 2015 08:59
Show Gist options
  • Save seawolf/5929794 to your computer and use it in GitHub Desktop.
Save seawolf/5929794 to your computer and use it in GitHub Desktop.
>> 1, 2
SyntaxError: compile error
>> x = 1, y = 2
=> [1, 2]
>> x
=> [1, 2]
>> y
=> 2
`1, 2` is invalid syntax.
Assignment of y = 2.
Assignment of x = [1, y] using bracketless syntax.
So, x = [1, 2] as y = 2.
And yes, ass-backward as fuck. But Ruby isn't English, is it?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment