Created
December 29, 2015 09:17
-
-
Save cho45/8d6ce35fd65b40e92d5b to your computer and use it in GitHub Desktop.
This file contains hidden or 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
class Foo | |
def to_a | |
[:to_a, :to_a] | |
end | |
def to_ary | |
[:to_ary, :to_ary] | |
end | |
end | |
a, b, c = *Foo.new | |
p [a, b, c] | |
a, b, c = Foo.new | |
p [a, b, c] | |
# ruby 2.0.0p481 (2014-05-08 revision 45883) [universal.x86_64-darwin13] | |
# [:to_a, :to_a, nil] | |
# [:to_ary, :to_ary, nil] | |
# mruby --version | |
# mruby 1.2.0 (2015-11-17) | |
# [:to_a, :to_a, nil] | |
# [#<Foo:0x7fd711804a40>, nil, nil] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment