Created
August 11, 2011 15:05
-
-
Save hynkle/1139897 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 self.define_bar | |
def self.bar | |
puts "bar was apparently defined!" | |
end | |
end | |
end | |
Foo.bar # raises NoMethodError | |
Foo.define_bar | |
Foo.bar # prints "bar was apparently defined!" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment