ruby-changes:56255
From: Nobuyoshi <ko1@a...>
Date: Fri, 28 Jun 2019 15:30:22 +0900 (JST)
Subject: [ruby-changes:56255] Nobuyoshi Nakada: f8b528ba92 (trunk): Suppress unused variable warnings
https://git.ruby-lang.org/ruby.git/commit/?id=f8b528ba92 From f8b528ba92b5cc4b84e8966dd5d5a072d076c1d1 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Fri, 28 Jun 2019 15:26:25 +0900 Subject: Suppress unused variable warnings diff --git a/test/ruby/test_settracefunc.rb b/test/ruby/test_settracefunc.rb index efd3318..cb9704f 100644 --- a/test/ruby/test_settracefunc.rb +++ b/test/ruby/test_settracefunc.rb @@ -1485,7 +1485,6 @@ class TestSetTraceFunc < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_settracefunc.rb#L1485 end def test_throwing_return_with_finish_frame - target_th = Thread.current evs = [] TracePoint.new(:call, :return){|tp| @@ -1922,18 +1921,18 @@ class TestSetTraceFunc < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_settracefunc.rb#L1921 a = 1 b = 2 1.times{|i| - x = i + _x = i } - c = a + b + _c = a + b end def method_for_enable_target2 a = 1 b = 2 1.times{|i| - x = i + _x = i } - c = a + b + _c = a + b end def check_with_events *trace_events @@ -1966,7 +1965,7 @@ class TestSetTraceFunc < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_settracefunc.rb#L1965 method_for_enable_target2 method_for_enable_target1 end - assert_equal all_events.find_all{|(ev, m)| trace_events.include? ev}, events + assert_equal all_events.find_all{|(ev)| trace_events.include? ev}, events end def test_tracepoint_enable_target @@ -1979,10 +1978,10 @@ class TestSetTraceFunc < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_settracefunc.rb#L1978 def test_tracepoint_nested_enabled_with_target code1 = proc{ - a = 1 + _a = 1 } code2 = proc{ - b = 2 + _b = 2 } ## error @@ -2124,12 +2123,12 @@ class TestSetTraceFunc < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_settracefunc.rb#L2123 TracePoint.new(:line) do |tp| events << Thread.current end.enable(target_thread: Thread.current) do - a = 1 + _a = 1 Thread.new{ - b = 2 - c = 3 + _b = 2 + _c = 3 }.join - d = 4 + _d = 4 end assert_equal Array.new(3){Thread.current}, events @@ -2143,14 +2142,14 @@ class TestSetTraceFunc < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_settracefunc.rb#L2142 th = Thread.new{ q1 << :ok; q2.pop - t1 = 1 - t2 = 2 + _t1 = 1 + _t2 = 2 } q1.pop tp.enable(target_thread: th) do q2 << 1 - a = 1 - b = 2 + _a = 1 + _b = 2 th.join end -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/