Skip to content

Instantly share code, notes, and snippets.

@NIA
Created February 15, 2013 11:43
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 NIA/4959907 to your computer and use it in GitHub Desktop.
Save NIA/4959907 to your computer and use it in GitHub Desktop.
Object#inspect demo
irb> class B
irb> def initialize
irb> @a = 1
irb> @b = 2
irb> end
irb> end
=> nil
irb> B.new.to_s
=> "#<B:0x4592ca0>"
irb> B.new.inspect
=> "#<B:0x4574f70 @b=2, @a=1>"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment