Skip to content

Instantly share code, notes, and snippets.

@MSch
Created February 22, 2010 01:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MSch/310671 to your computer and use it in GitHub Desktop.
Save MSch/310671 to your computer and use it in GitHub Desktop.
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