Skip to content

Instantly share code, notes, and snippets.

@marcdel
Created March 23, 2013 20:46
Show Gist options
  • Save marcdel/5229288 to your computer and use it in GitHub Desktop.
Save marcdel/5229288 to your computer and use it in GitHub Desktop.
'object.inspect' is equivalent to 'p object'
[15] pry(main)> a.inspect
=> "[1, 2, 3, 4, 5]"
[16] pry(main)> p a
[1, 2, 3, 4, 5]
=> [1, 2, 3, 4, 5]
[17] pry(main)> b.inspect
=> "{:some=>\"thing\"}"
[18] pry(main)> p b
{:some=>"thing"}
=> {:some=>"thing"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment