Created
November 16, 2009 21:26
-
-
Save santosh79/236331 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
#We can force the execution order of methods | |
class Foo | |
def start | |
def stop | |
end | |
end | |
end | |
f = Foo.new | |
f.stop #This FAILS because the *stop* method does not get defined until the start gets called | |
f.start | |
f.stop #Now it succeeds |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment