Skip to content

Instantly share code, notes, and snippets.

@shepmaster
Created December 8, 2011 15:18
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 shepmaster/1447264 to your computer and use it in GitHub Desktop.
Save shepmaster/1447264 to your computer and use it in GitHub Desktop.
Learned a new thing that should have been obvious in retrospect...
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