ruby-changes:13594
From: matz <ko1@a...>
Date: Fri, 16 Oct 2009 20:20:21 +0900 (JST)
Subject: [ruby-changes:13594] Ruby:r25375 (trunk): * lib/delegate.rb (Delegator#method_missing): remove backtrace
matz 2009-10-16 20:20:06 +0900 (Fri, 16 Oct 2009) New Revision: 25375 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=25375 Log: * lib/delegate.rb (Delegator#method_missing): remove backtrace lines _until_ `method_missing'. Modified files: trunk/ChangeLog trunk/lib/delegate.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 25374) +++ ChangeLog (revision 25375) @@ -1,3 +1,8 @@ +Fri Oct 16 20:18:28 2009 Yukihiro Matsumoto <matz@r...> + + * lib/delegate.rb (Delegator#method_missing): remove backtrace + lines _until_ `method_missing'. + Fri Oct 16 20:09:55 2009 Yukihiro Matsumoto <matz@r...> * lib/delegate.rb (Delegator#freeze): #freeze should freeze self Index: lib/delegate.rb =================================================================== --- lib/delegate.rb (revision 25374) +++ lib/delegate.rb (revision 25375) @@ -137,7 +137,9 @@ target.__send__(m, *args, &block) end rescue Exception - $@.delete_if{|s| %r"\A#{Regexp.quote(__FILE__)}:\d+:in `method_missing'\z"o =~ s} + if i = $@.index{|s| %r"\A#{Regexp.quote(__FILE__)}:\d+:in `method_missing'\z"o =~ s} + $@[0..i] = [] + end ::Kernel::raise end end -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/