Created
June 19, 2018 14:38
-
-
Save flash-gordon/12d794d7d3d881b9cfca0810c9b39013 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 Foo | |
def self.===(obj) | |
true | |
end | |
end | |
begin | |
1 / 0 | |
rescue Foo | |
puts 'Rescued!' | |
end | |
__END__ | |
$ ruby test.rb | |
Rescued! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment