mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/delegate.rb: check $@ to avoid NoMethodError.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@15752 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
163b436fad
commit
4a03617eea
2 changed files with 6 additions and 2 deletions
|
@ -1,3 +1,7 @@
|
|||
Wed Mar 12 02:12:20 2008 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
|
||||
|
||||
* lib/delegate.rb: check $@ to avoid NoMethodError.
|
||||
|
||||
Tue Mar 11 19:48:09 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* numeric.c (fix_coerce): try conversion before type check.
|
||||
|
|
|
@ -139,7 +139,7 @@ class Delegator
|
|||
begin
|
||||
__getobj__.__send__(:#{method}, *args, &block)
|
||||
ensure
|
||||
$@.delete_if{|s|IgnoreBacktracePat=~s}
|
||||
$@.delete_if{|s|IgnoreBacktracePat=~s} if $@
|
||||
end
|
||||
end
|
||||
EOS
|
||||
|
@ -295,7 +295,7 @@ def DelegateClass(superclass)
|
|||
begin
|
||||
@_dc_obj.__send__(:#{method}, *args, &block)
|
||||
ensure
|
||||
$@.delete_if{|s| ::Delegator::IgnoreBacktracePat =~ s}
|
||||
$@.delete_if{|s| ::Delegator::IgnoreBacktracePat =~ s} if $@
|
||||
end
|
||||
end
|
||||
EOS
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue