Skip to content

Instantly share code, notes, and snippets.

@brixen brixen/0.output

Last active Aug 29, 2015
What would you like to do?
Keyword rest argument processing is inconsistent
$ ruby -v keyword_gotcha.rb
ruby 2.2.0dev (2014-06-05 trunk 46353) [x86_64-darwin13]
def m(a: 1, **kw)
p a, kw
kw[:gotcha] = 1
h = {b: 2}
m h
p h
h = {}
m h
p h
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.