Created
January 16, 2015 15:56
-
-
Save kinncj/6dfd280248b53e4cb2da to your computer and use it in GitHub Desktop.
wtf? construct return different type
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 ConcreteKlass | |
def self.new() | |
return [] | |
end | |
end | |
obj = ConcreteKlass.new | |
print obj.inspect #WHY? WHYYY? Hey, let's instantiate new ConcreteKlass, now, it's an array? WTF! |
renatomefi
commented
Jan 16, 2015
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment