Skip to content

Instantly share code, notes, and snippets.

@subbuss
Created November 17, 2014 08:30
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 subbuss/25fef7146f3c0203c819 to your computer and use it in GitHub Desktop.
Save subbuss/25fef7146f3c0203c819 to your computer and use it in GitHub Desktop.
[subbu@earth ir] cat /tmp/kw.rb
class C
def foo(str: "foo", num: 42, **opts)
p str, num, opts
end
end
class D < C
def foo(str: "bar", num: 45, **opts)
super
end
end
p "--C--"
C.new.foo
p "--D1--"
D.new.foo
p "--D2--"
D.new.foo(str: "d", num:75, a:1, b:2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment