Created
November 9, 2012 23:06
-
-
Save cheald/4048912 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 | |
@start = Time.now.to_i | |
def self.start | |
@start | |
end | |
def make_another_class | |
Class.new do | |
@start = Time.now.to_i | |
def self.start | |
@start | |
end | |
end | |
end | |
end | |
f = Foo.new | |
puts "F's start was defined at #{Foo.start}" | |
sleep(2) | |
c = f.make_another_class | |
puts "C's start was defined at #{c.start}" |
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
F's start was defined at 1352502381 | |
C's start was defined at 1352502383 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment