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

ruby-changes:55951

From: Hiroshi <ko1@a...>
Date: Sat, 1 Jun 2019 21:21:56 +0900 (JST)
Subject: [ruby-changes:55951] Hiroshi SHIBATA: 464e55f1d0 (trunk): Ignore warnings about argument prefix with operator symbol.

https://git.ruby-lang.org/ruby.git/commit/?id=464e55f1d0

From 464e55f1d0296c3593157a89159f75d58397a1f5 Mon Sep 17 00:00:00 2001
From: Hiroshi SHIBATA <hsbt@r...>
Date: Sat, 1 Jun 2019 15:20:21 +0300
Subject: Ignore warnings about argument prefix with operator symbol.


diff --git a/test/-ext-/iter/test_yield_block.rb b/test/-ext-/iter/test_yield_block.rb
index 0036854..c03a8ee 100644
--- a/test/-ext-/iter/test_yield_block.rb
+++ b/test/-ext-/iter/test_yield_block.rb
@@ -16,7 +16,7 @@ class TestIter::YieldBlock < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/-ext-/iter/test_yield_block.rb#L16
       block.call {}
     end
     def call_lambda(&block)
-      block.call &->{}
+      block.call(&->{})
     end
   end
 
diff --git a/test/ruby/test_lazy_enumerator.rb b/test/ruby/test_lazy_enumerator.rb
index 03371c9..d42c8d3 100644
--- a/test/ruby/test_lazy_enumerator.rb
+++ b/test/ruby/test_lazy_enumerator.rb
@@ -17,9 +17,9 @@ class TestLazyEnumerator < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_lazy_enumerator.rb#L17
       @enum.each do |v|
         @current = v
         if v.is_a? Enumerable
-          yield *v
+          yield(*v)
         else
-          yield v
+          yield(v)
         end
       end
     end
diff --git a/test/ruby/test_refinement.rb b/test/ruby/test_refinement.rb
index 49bf907..8908d35 100644
--- a/test/ruby/test_refinement.rb
+++ b/test/ruby/test_refinement.rb
@@ -2096,7 +2096,7 @@ class TestRefinement < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_refinement.rb#L2096
         end
       }
       def call
-        ToProc.call &self
+        ToProc.call(&self)
       end
     end
 
@@ -2111,7 +2111,7 @@ class TestRefinement < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_refinement.rb#L2111
       }
 
       def call
-        ToProc.call &self
+        ToProc.call(&self)
       end
     end
 
@@ -2127,14 +2127,14 @@ class TestRefinement < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_refinement.rb#L2127
       }
 
       def call
-        ToProc.call &self
+        ToProc.call(&self)
       end
     end
 
 
     class NonProc
       def call
-        ToProc.call &self
+        ToProc.call(&self)
       end
     end
 
@@ -2144,7 +2144,7 @@ class TestRefinement < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_refinement.rb#L2144
       end
 
       def call
-        ToProc.call &self
+        ToProc.call(&self)
       end
       end
 
@@ -2163,7 +2163,7 @@ class TestRefinement < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_refinement.rb#L2163
       }
 
       def call
-        ToProc.call &self
+        ToProc.call(&self)
       end
     end
 
@@ -2182,7 +2182,7 @@ class TestRefinement < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_refinement.rb#L2182
       }
 
       def call
-        ToProc.call &self
+        ToProc.call(&self)
       end
     end
   end
-- 
cgit v0.10.2


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

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