Skip to content

Instantly share code, notes, and snippets.

@qrush
Created February 14, 2011 16:54
Show Gist options
  • Save qrush/826147 to your computer and use it in GitHub Desktop.
Save qrush/826147 to your computer and use it in GitHub Desktop.
ruby % rvm use 1.9.2
Using /Users/qrush/.rvm/gems/ruby-1.9.2-p136
ruby % irb
ruby-1.9.2-p136 :001 > a = []
=> []
ruby-1.9.2-p136 :002 > a.push(3,)
=> [3]
ruby % rvm use ree
Using /Users/qrush/.rvm/gems/ree-1.8.7-2010.02
ruby % irb
ree-1.8.7-2010.02 :001 > a = []
=> []
ree-1.8.7-2010.02 :002 > a.push(3,)
SyntaxError: compile error
(irb):2: syntax error, unexpected ')'
from (irb):2
from :0
@tpope
Copy link

tpope commented Feb 14, 2011

This has always worked for arrays ([3,]). Ruby 1.9 just extends it to parameter lists.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment