Skip to content

Instantly share code, notes, and snippets.

@headius

headius/blah.rb Secret

Created December 11, 2020 20:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save headius/7b003735c5ee063ce102f0e37a31e02c to your computer and use it in GitHub Desktop.
Save headius/7b003735c5ee063ce102f0e37a31e02c to your computer and use it in GitHub Desktop.
h = Class.new { def to_h; {a:1}; end}.new
class X
def blah(*args, **kwargs)
[args, kwargs]
end
end
class Y < X
def blah(*args)
super
end
end
args, kwargs = Y.new.blah(h)
p args
p kwargs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment