Created
October 10, 2014 02:56
-
-
Save ainame/f2d588dae0817da95766 to your computer and use it in GitHub Desktop.
罠
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
user = { | |
id: 1, | |
name: 'ainame', | |
} | |
if flag | |
user[:gender] = 'male', # ← 末尾にカンマが入ってしまっていたけどシンタックスエラーにはならない | |
user[:age] = 100 | |
end | |
# user[:gender] #=> ['male', 100] | |
# user[:age] #=> 100 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment