Skip to content

Instantly share code, notes, and snippets.

@danielfone
Created June 1, 2013 01:53
Show Gist options
  • Select an option

  • Save danielfone/5689016 to your computer and use it in GitHub Desktop.

Select an option

Save danielfone/5689016 to your computer and use it in GitHub Desktop.
MyExceptions = [RangeError, RegexpError, IOError].freeze
begin
raise IOError, "should be rescued"
rescue *MyExceptions => e
puts e
end
@cisolarix
Copy link

This way we don't have to slap ourselves in the face, huh?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment