From b105cbc80986eb684a272788111f36f6624fedb7 Mon Sep 17 00:00:00 2001 From: naruse Date: Mon, 30 Jun 2014 10:11:02 +0000 Subject: [PATCH] suppress warnings: assigned but unused variable git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46625 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/uri/mailto.rb | 2 -- test/lib/tracepointchecker.rb | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/uri/mailto.rb b/lib/uri/mailto.rb index 325002de29..3499910787 100644 --- a/lib/uri/mailto.rb +++ b/lib/uri/mailto.rb @@ -136,10 +136,8 @@ module URI @headers = [] to, header = @opaque.split('?', 2) - addrs = to.split(/[,;]/) # allow semicolon as a addr-spec separator # http://support.microsoft.com/kb/820868 - unless /\A(?:[^@,;]+@[^@,;]+(?:\z|[,;]))*\z/ =~ to raise InvalidComponentError, "unrecognised opaque part for mailtoURL: #{@opaque}" diff --git a/test/lib/tracepointchecker.rb b/test/lib/tracepointchecker.rb index f90611b536..4612e62e82 100644 --- a/test/lib/tracepointchecker.rb +++ b/test/lib/tracepointchecker.rb @@ -6,7 +6,7 @@ module TracePointChecker module ZombieTraceHunter def before_setup - @tracepoint_captured_stat = TracePoint.stat.map{|k, (activated, deleted)| [k, activated]} + @tracepoint_captured_stat = TracePoint.stat.map{|k, (activated, _deleted)| [k, activated]} super end @@ -17,7 +17,7 @@ module TracePointChecker # detect zombie traces. assert_equal( @tracepoint_captured_stat, - TracePoint.stat.map{|k, (activated, deleted)| [k, activated]}, + TracePoint.stat.map{|k, (activated, _deleted)| [k, activated]}, "The number of active trace events was changed" ) # puts "TracePoint - deleted: #{deleted}" if deleted > 0