Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@tazsingh
Created April 13, 2015 17:32
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 tazsingh/386c1ecb47ad72663774 to your computer and use it in GitHub Desktop.
Save tazsingh/386c1ecb47ad72663774 to your computer and use it in GitHub Desktop.
Pry suppress output behaviour
[1] pry(main)> class Foo
[1] pry(main)* def inspect
[1] pry(main)* binding.pry
[1] pry(main)* end
[1] pry(main)* end
=> nil
[2] pry(main)> Foo.new
=> ERROR: Pry started inside Pry.
This can happen if you have a binding.pry inside a #to_s or #inspect function.
#<Foo:0x1f4e>
[3] pry(main)> Foo.new;
[4] pry(main)> exit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment