[前][次][番号順一覧][スレッド一覧]

ruby-changes:12803

From: matz <ko1@a...>
Date: Fri, 14 Aug 2009 00:21:52 +0900 (JST)
Subject: [ruby-changes:12803] Ruby:r24531 (trunk): * lib/delegate.rb (Delegator#method_missing): __FILE__ may contain

matz	2009-08-14 00:21:32 +0900 (Fri, 14 Aug 2009)

  New Revision: 24531

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=24531

  Log:
    * lib/delegate.rb (Delegator#method_missing): __FILE__ may contain
      multi-byte characters.  a patch from Kenta Murata in [ruby-dev:39066].

  Modified files:
    trunk/ChangeLog
    trunk/lib/delegate.rb

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 24530)
+++ ChangeLog	(revision 24531)
@@ -1,3 +1,8 @@
+Fri Aug 14 00:19:49 2009  Yukihiro Matsumoto  <matz@r...>
+
+	* lib/delegate.rb (Delegator#method_missing): __FILE__ may contain
+	  multi-byte characters.  a patch from Kenta Murata in [ruby-dev:39066].
+
 Thu Aug 13 21:01:03 2009  wanabe  <s.wanabe@g...>
 
 	* vm.c (vm_exec): returning from lambda runs ensure section.
Index: lib/delegate.rb
===================================================================
--- lib/delegate.rb	(revision 24530)
+++ lib/delegate.rb	(revision 24531)
@@ -137,7 +137,7 @@
         target.__send__(m, *args, &block)
       end
     rescue Exception
-      $@.delete_if{|s| %r"\A#{__FILE__}:\d+:in `method_missing'\z"o =~ s}
+      $@.delete_if{|s| %r"\A#{Regexp.quote(__FILE__)}:\d+:in `method_missing'\z"o =~ s}
       ::Kernel::raise
     end
   end

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]