Created
November 23, 2014 15:47
-
-
Save JacobNinja/f5fda976f38d23477547 to your computer and use it in GitHub Desktop.
Destructuring with splat
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
class NilClass | |
def to_a | |
p 'calling to_a within NilClass' | |
[] | |
end | |
end | |
# irb(main):017:0> [*nil] | |
# "calling to_a within NilClass" | |
# => [] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment