1
0
Fork 0
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:
kazu 2008-03-11 17:16:55 +00:00
parent 163b436fad
commit 4a03617eea
2 changed files with 6 additions and 2 deletions

View file

@ -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.

View file

@ -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