Created
October 29, 2011 06:02
-
-
Save myronmarston/1324150 to your computer and use it in GitHub Desktop.
Demonstration of a weird bug in MRI 1.8
This file contains 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
def expected_error | |
defined?(::Some::OtherError) ? ::Some::OtherError : ArgumentError | |
end | |
begin | |
begin | |
raise "boom" | |
rescue expected_error | |
end | |
rescue Exception => e | |
puts e | |
end | |
puts "after error" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment