-
-
Save enebo/09b68423b763a2489a1139b02d319d9a to your computer and use it in GitHub Desktop.
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 One | |
def foo | |
puts "foo" | |
end | |
def bar | |
puts "bar" | |
end | |
end | |
class Two < One | |
def foo | |
super | |
end | |
alias :bar :foo | |
end | |
Two.new.bar |
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
mri31 ../../snippets/alias4.rb | |
foo |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment