Created
May 26, 2013 09:11
-
-
Save igrep/5652164 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
| class DefinitelyRescuedException < Exception | |
| def is_a? _klass | |
| true | |
| end | |
| def < _klass | |
| true | |
| end | |
| def > _klass | |
| false | |
| end | |
| end | |
| class OrdinayException < Exception ; end | |
| begin | |
| raise DefinitelyRescuedException | |
| rescue StandardError => e | |
| puts "I rescued: #{e.class}" | |
| end | |
| begin | |
| raise OrdinayException | |
| rescue StandardError => e | |
| puts "I rescued: #{e.class}" | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment