Created
August 15, 2011 00:02
-
-
Save igrigorik/1145480 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
igrigorik { /git/goliath/examples } > cat test.rb | |
blk = Proc.new {|a,*b| p [:block_args, a,b] } | |
blk.call(1,2,3) | |
blk.call([1,2,3]) | |
igrigorik { /git/goliath/examples } > ruby -v | |
ruby 1.9.2p180 (2011-02-18 revision 30909) [x86_64-darwin10.7.0] | |
igrigorik { /git/goliath/examples } > ruby test.rb | |
[:block_args, 1, [2, 3]] | |
[:block_args, 1, [2, 3]] | |
igrigorik { /git/goliath/examples } > rvm use jruby | |
Using /Users/igrigorik/.rvm/gems/jruby-1.6.2 | |
igrigorik { /git/goliath/examples } > jruby --1.9 test.rb | |
[:block_args, 1, [2, 3]] | |
[:block_args, [1, 2, 3], []] <<<<<<<<<<<<<<<<<<<<<<< Hmmm? | |
igrigorik { /git/goliath/examples } > jruby test.rb | |
[:block_args, 1, [2, 3]] | |
[:block_args, 1, [2, 3]] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment