Created
April 5, 2011 11:15
-
-
Save rb2k/903432 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 self.doit | |
puts "nike" | |
end | |
def bar | |
Foo.doit() | |
end | |
def bar2 | |
self.doit() | |
end | |
end | |
Foo.doit() #works | |
Foo.new().bar #works | |
Foo.new().bar2() #breaks |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment