Skip to content

Instantly share code, notes, and snippets.

@dennisreimann
Forked from arbovm/poor_mans_debugger.rb
Created November 21, 2009 18:11
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 dennisreimann/240219 to your computer and use it in GitHub Desktop.
Save dennisreimann/240219 to your computer and use it in GitHub Desktop.
# poor mans debugger
#
# if you want to know whats the value of an object just add .why?
# and you will see what it is and why your program behaves like it does.
#
Object.class_eval {def why?; raise "Because it is #{inspect}" ; end}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment