Last active
September 15, 2017 10:10
-
-
Save kalorz/f1cdd2d3e089e087197e0c2bccd4ce09 to your computer and use it in GitHub Desktop.
Ruby Gotchas: super
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Foo | |
def show | |
puts 'Foo#show' | |
end | |
end | |
class Bar < Foo | |
def show(text) | |
super | |
puts text | |
end | |
end | |
Bar.new.show('test') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment