Skip to content

Instantly share code, notes, and snippets.

@tadast

tadast/hash_wat.rb

Last active Aug 29, 2015
Embed
What would you like to do?
ruby **options inconsistency
def foo(a, *b, **c)
[a, b, c]
end
=> :foo
[16] » foo 10, {d: 40, e: 50}
=> [
[0] 10,
[1] [],
[2] {
:d => 40,
:e => 50
}
]
[17] » foo 10, {d: 40, e: 50}.with_indifferent_access
=> [
[0] 10,
[1] [
[0] {
"d" => 40,
"e" => 50
}
],
[2] {}
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.