diff options
Diffstat (limited to 'lib/bacon.rb')
-rw-r--r-- | lib/bacon.rb | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/lib/bacon.rb b/lib/bacon.rb index 3b71fd1..ad4df44 100644 --- a/lib/bacon.rb +++ b/lib/bacon.rb @@ -237,17 +237,9 @@ end class Proc def raise?(*exceptions) - exceptions = [RuntimeError] if exceptions.empty? call - - # Only to work in 1.9.0, rescue with splat doesn't work there right now - rescue Object => e - case e - when *exceptions - e - else - raise e - end + rescue *(exceptions.empty? ? RuntimeError : exceptions) => e + e else false end @@ -285,7 +277,6 @@ module Kernel def shared(name, &block) Bacon::Shared[name] = block end end - class Should # Kills ==, ===, =~, eql?, equal?, frozen?, instance_of?, is_a?, # kind_of?, nil?, respond_to?, tainted? |