Created
December 8, 2011 15:18
-
-
Save shepmaster/1447264 to your computer and use it in GitHub Desktop.
Learned a new thing that should have been obvious in retrospect...
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 Foo | |
attr_accessor :a | |
def initialize | |
@a = 1 | |
end | |
end | |
foo = Foo.new | |
puts foo.a | |
foo.a = 2 | |
puts foo.a | |
foo.send(:initialize) | |
puts foo.a |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment