Created
March 9, 2012 22:56
-
-
Save twerth/2009160 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 Foo | |
>> def bar | |
>> puts 'in bar' | |
>> end | |
>> end | |
=> nil | |
>> class Foo2 < Foo | |
>> def bar | |
>> super | |
>> puts 'in bar in foo2' | |
>> end | |
>> end | |
=> nil | |
>> f = Foo.new | |
=> #<Foo:0x007fc85110c068> | |
>> f.bar | |
in bar | |
=> nil | |
>> f2 = Foo2.new | |
=> #<Foo2:0x007fc8511026a8> | |
>> f.bar | |
in bar | |
=> nil | |
>> f2.bar | |
in bar | |
in bar in foo2 | |
=> nil | |
>> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment