Created
October 14, 2014 10:53
-
-
Save godfat/e635d7d06b49eae2ad31 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
def f a={}, **b | |
[a, b] | |
end | |
# huh? | |
f({:a => 0}) # => [{}, {:a => 0}] | |
# as expected | |
f(0) # => [0, {}] | |
# as expected | |
f({:a => 0}, {:b => 1}) # => [{:a => 0}, {:b => 1}] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment