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

ruby-changes:32941

From: hsbt <ko1@a...>
Date: Mon, 17 Feb 2014 11:40:06 +0900 (JST)
Subject: [ruby-changes:32941] hsbt:r45020 (trunk): * test/test_pty.rb: use underscore variables. because ignored unseued variables.

hsbt	2014-02-17 11:39:59 +0900 (Mon, 17 Feb 2014)

  New Revision: 45020

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

  Log:
    * test/test_pty.rb: use underscore variables. because ignored unseued variables.

  Modified files:
    trunk/ChangeLog
    trunk/test/test_pty.rb
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 45019)
+++ ChangeLog	(revision 45020)
@@ -1,3 +1,7 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Mon Feb 17 11:28:40 2014  SHIBATA Hiroshi  <shibata.hiroshi@g...>
+
+	* test/test_pty.rb: ignore warnings to unused variables.
+
 Mon Feb 17 11:27:36 2014  SHIBATA Hiroshi  <shibata.hiroshi@g...>
 
 	* test/test_find.rb: remove unused variables.
Index: test/test_pty.rb
===================================================================
--- test/test_pty.rb	(revision 45019)
+++ test/test_pty.rb	(revision 45020)
@@ -12,7 +12,7 @@ class TestPTY < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/test_pty.rb#L12
   RUBY = EnvUtil.rubybin
 
   def test_spawn_without_block
-    r, w, pid = PTY.spawn(RUBY, '-e', 'puts "a"')
+    r, _, pid = PTY.spawn(RUBY, '-e', 'puts "a"')
   rescue RuntimeError
     skip $!
   else
@@ -58,7 +58,7 @@ class TestPTY < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/test_pty.rb#L58
     assert_equal(2, ret.length)
     assert_equal(IO, ret[0].class)
     assert_equal(File, ret[1].class)
-    master, slave = ret
+    _, slave = ret
     assert(slave.tty?)
     assert(File.chardev?(slave.path))
   ensure
@@ -77,7 +77,7 @@ class TestPTY < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/test_pty.rb#L77
       assert_equal(2, ret.length)
       assert_equal(IO, ret[0].class)
       assert_equal(File, ret[1].class)
-      master, slave = ret
+      _, slave = ret
       assert(slave.tty?)
       assert(File.chardev?(slave.path))
       x

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

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