Created
April 12, 2012 15:30
-
-
Save tcrayford/2368223 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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