Created
February 25, 2012 14:32
-
-
Save schinen/1908767 to your computer and use it in GitHub Desktop.
script 'varargs_test.rb' result on JRuby 1.9 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 --version | |
jruby 1.6.7 (ruby-1.9.2-p312) (2012-02-22 3e82bc8) (Java HotSpot(TM) 64-Bit Server VM 1.7.0_02) [Windows 7-amd64-java] | |
>jruby varargs_test.rb | |
-------------------- | |
pass String | |
args : ["bar"] | |
args.join(', ') : bar | |
-------------------- | |
pass Strings | |
args : ["bar", "hoge"] | |
args.join(', ') : bar, hoge | |
-------------------- | |
pass Symbol | |
args : [:bar] | |
args.join(', ') : can't convert Symbol into String | |
-------------------- | |
pass Symbol | |
args : [:bar, :hoge] | |
args.join(', ') : can't convert Symbol into String | |
-------------------- | |
pass FixNum | |
args : [1] | |
args.join(', ') : can't convert Fixnum into String | |
-------------------- | |
pass FixNums | |
args : [1, 2] | |
args.join(', ') : can't convert Fixnum into String | |
-------------------- | |
pass Foo class | |
args : [#<Foo:0x21fd3d92>] | |
args.join(', ') : can't convert Foo into String | |
-------------------- | |
pass Foo object and Bar object | |
args : [#<Foo:0x2523a57f>, #<Bar:0x474647e5>] | |
args.join(', ') : can't convert Foo into String |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment