Created
February 22, 2010 01:07
-
-
Save MSch/310671 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 A | |
def a | |
5 | |
end | |
def demo | |
puts a # => 5 | |
puts self.a # => 5 | |
a = 6 | |
puts a # => 6 | |
puts self.a # => 5 | |
end | |
end | |
A.new.demo |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment