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

ruby-changes:34544

From: naruse <ko1@a...>
Date: Mon, 30 Jun 2014 19:11:12 +0900 (JST)
Subject: [ruby-changes:34544] naruse:r46625 (trunk): suppress warnings: assigned but unused variable

naruse	2014-06-30 19:11:02 +0900 (Mon, 30 Jun 2014)

  New Revision: 46625

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

  Log:
    suppress warnings: assigned but unused variable

  Modified files:
    trunk/lib/uri/mailto.rb
    trunk/test/lib/tracepointchecker.rb
Index: lib/uri/mailto.rb
===================================================================
--- lib/uri/mailto.rb	(revision 46624)
+++ lib/uri/mailto.rb	(revision 46625)
@@ -136,10 +136,8 @@ module URI https://github.com/ruby/ruby/blob/trunk/lib/uri/mailto.rb#L136
       @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}"
Index: test/lib/tracepointchecker.rb
===================================================================
--- test/lib/tracepointchecker.rb	(revision 46624)
+++ test/lib/tracepointchecker.rb	(revision 46625)
@@ -6,7 +6,7 @@ module TracePointChecker https://github.com/ruby/ruby/blob/trunk/test/lib/tracepointchecker.rb#L6
 
   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 https://github.com/ruby/ruby/blob/trunk/test/lib/tracepointchecker.rb#L17
       # 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

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

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