Skip to content

Instantly share code, notes, and snippets.

@flash-gordon
Created June 19, 2018 14:38
Show Gist options
  • Save flash-gordon/12d794d7d3d881b9cfca0810c9b39013 to your computer and use it in GitHub Desktop.
Save flash-gordon/12d794d7d3d881b9cfca0810c9b39013 to your computer and use it in GitHub Desktop.
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