Created
February 7, 2012 18:19
-
-
Save qxjit/1761077 to your computer and use it in GitHub Desktop.
Please tell me this is a bug
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
# ruby -v | |
# ruby 1.9.2p180 (2011-02-18 revision 30909) [x86_64-darwin10.8.0] | |
# | |
# note that you shouldn't use class variables anyhow... | |
class Foo | |
@@in_foo = 2 | |
def self.in_foo; @@in_foo; end | |
end | |
class Object | |
@@in_foo = 3 | |
end | |
puts Foo.in_foo #=> 3 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It was a joke, but I was referring to this... taking it to Object is just the "obvious next step." :)