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

ruby-changes:43307

From: usa <ko1@a...>
Date: Sat, 11 Jun 2016 23:08:56 +0900 (JST)
Subject: [ruby-changes:43307] usa:r55381 (trunk): * lib/forwardable.rb (_delegator_method): get rid of a warning which

usa	2016-06-11 23:08:50 +0900 (Sat, 11 Jun 2016)

  New Revision: 55381

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=55381

  Log:
    * lib/forwardable.rb (_delegator_method): get rid of a warning which
      causes test failures introduced at r55376.

  Modified files:
    trunk/ChangeLog
    trunk/lib/forwardable.rb
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 55380)
+++ ChangeLog	(revision 55381)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Sat Jun 11 23:07:32 2016  NAKAMURA Usaku  <usa@r...>
+
+	* lib/forwardable.rb (_delegator_method): get rid of a warning which
+	  causes test failures introduced at r55376.
+
 Sat Jun 11 18:37:58 2016  Marcus Stollsteimer  <sto.mar@w...>
 
 	* ext/json/lib/*.rb: Removed some comments. Because these are unnecessary
Index: lib/forwardable.rb
===================================================================
--- lib/forwardable.rb	(revision 55380)
+++ lib/forwardable.rb	(revision 55381)
@@ -202,7 +202,9 @@ module Forwardable https://github.com/ruby/ruby/blob/trunk/lib/forwardable.rb#L202
            else
              iseq.to_a.dig(-1, 1, 1, :mid) == method.to_sym
            end
-      method = "__send__ :#{method},"
+      method_call = "__send__(:#{method}, *args, &block)"
+    else
+      method_call = "#{method}(*args, &block)"
     end
 
     line_no = __LINE__+1; str = "#{<<-"begin;"}\n#{<<-"end;"}"
@@ -211,7 +213,7 @@ module Forwardable https://github.com/ruby/ruby/blob/trunk/lib/forwardable.rb#L213
         def #{ali}(*args, &block)
           begin
             #{accessor}
-          end.#{method} *args, &block
+          end.#{method_call}
         end
       end
     end;

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

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