Created
April 1, 2015 00:47
-
-
Save Vaysman/54f50ed98debfeab8550 to your computer and use it in GitHub Desktop.
To demonstrate strange behaviour in ruby-ncurses gem
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 A | |
def to_s | |
"class a" | |
end | |
end | |
class B | |
def B.new() | |
A.new() | |
end | |
def to_s | |
"class b" | |
end | |
end | |
class C < B | |
def initialize | |
super | |
end | |
def to_s | |
"class c" | |
end | |
end | |
c = C.new | |
c.to_s # => "class a" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment