Created
February 25, 2012 14:34
-
-
Save schinen/1908775 to your computer and use it in GitHub Desktop.
script 'varargs_test.rb' result on JRuby 1.8 mode
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
>jruby --1.8 --version | |
jruby 1.6.7 (ruby-1.8.7-p357) (2012-02-22 3e82bc8) (Java HotSpot(TM) 64-Bit Server VM 1.7.0_02) [Windows 7-amd64-java] | |
>jruby --1.8 varargs_test.rb | |
-------------------- | |
pass String | |
args : bar | |
args.join(', ') : bar | |
-------------------- | |
pass Strings | |
args : barhoge | |
args.join(', ') : bar, hoge | |
-------------------- | |
pass Symbol | |
args : bar | |
args.join(', ') : bar | |
-------------------- | |
pass Symbol | |
args : barhoge | |
args.join(', ') : bar, hoge | |
-------------------- | |
pass FixNum | |
args : 1 | |
args.join(', ') : 1 | |
-------------------- | |
pass FixNums | |
args : 12 | |
args.join(', ') : 1, 2 | |
-------------------- | |
pass Foo class | |
args : #<Foo:0x4fbf7a02> | |
args.join(', ') : #<Foo:0x4fbf7a02> | |
-------------------- | |
pass Foo object and Bar object | |
args : #<Foo:0x23e34235>#<Bar:0x1d0fb7fb> | |
args.join(', ') : #<Foo:0x23e34235>, #<Bar:0x1d0fb7fb> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment