Skip to content

Instantly share code, notes, and snippets.

@chrisseaton
Created May 11, 2015 17:14
Show Gist options
  • Save chrisseaton/e988a3b7910d2771b6e7 to your computer and use it in GitHub Desktop.
Save chrisseaton/e988a3b7910d2771b6e7 to your computer and use it in GitHub Desktop.
class A
def foo(a, b, c)
p [a, b, c]
end
end
class B < A
def foo(a, (b, c), d)
a = 5 # modify a - the super call sees it
b = 6 # modify b - the super call doesn't see it
super
end
end
B.new.foo(1, [2, 3], 4)
# [5, [2, 3], 4]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment