Skip to content

Instantly share code, notes, and snippets.

@tcrayford
Created April 12, 2012 15:30
Show Gist options
  • Save tcrayford/2368223 to your computer and use it in GitHub Desktop.
Save tcrayford/2368223 to your computer and use it in GitHub Desktop.
1.9.3p125 :001 > class Foo < RuntimeError; def to_str; "other_string"; end; end
=> nil
1.9.3p125 :002 > begin raise Foo.new; rescue Foo => e; end
RuntimeError: other_string
from (irb):2
from /Users/tcrayford/.rvm/rubies/ruby-1.9.3-p125/bin/irb:16:in `<main>'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment