aboutsummaryrefslogtreecommitdiffstats
path: root/lib/forwardable.rb
diff options
context:
space:
mode:
authorshugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-10-23 15:41:04 +0000
committershugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-10-23 15:41:04 +0000
commited9ad8c31e29d00c71b59c25e9a5bf2182090496 (patch)
treed1b5a519ebe1a226e5425cf140e0e62cab2cf5cd /lib/forwardable.rb
parent1187dd195ba5c47b7bbbeae32e6d394086a7b68f (diff)
downloadruby-ed9ad8c31e29d00c71b59c25e9a5bf2182090496.tar.gz
* lib/forwardable (def_instance_delegator, def_single_delegator):
rescue ::Exception instead of Exception in case Exception is defined under the target class. [ruby-core:71175] [Ruby trunk - Bug #11615] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52249 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/forwardable.rb')
-rw-r--r--lib/forwardable.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/forwardable.rb b/lib/forwardable.rb
index ecc5f03843..d814a756fa 100644
--- a/lib/forwardable.rb
+++ b/lib/forwardable.rb
@@ -181,7 +181,7 @@ module Forwardable
def #{ali}(*args, &block)
begin
#{accessor}.__send__(:#{method}, *args, &block)
- rescue Exception
+ rescue ::Exception
$@.delete_if{|s| Forwardable::FILE_REGEXP =~ s} unless Forwardable::debug
::Kernel::raise
end
@@ -273,7 +273,7 @@ module SingleForwardable
def #{ali}(*args, &block)
begin
#{accessor}.__send__(:#{method}, *args, &block)
- rescue Exception
+ rescue ::Exception
$@.delete_if{|s| Forwardable::FILE_REGEXP =~ s} unless Forwardable::debug
::Kernel::raise
end