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

ruby-changes:36906

From: nobu <ko1@a...>
Date: Thu, 25 Dec 2014 12:51:32 +0900 (JST)
Subject: [ruby-changes:36906] nobu:r48987 (trunk): test_io_console.rb: chomp results

nobu	2014-12-25 12:51:27 +0900 (Thu, 25 Dec 2014)

  New Revision: 48987

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

  Log:
    test_io_console.rb: chomp results
    
    * test/io/console/test_io_console.rb (run_pty): IO#readlines
      ignores the given block.  need map to chomp the results.

  Modified files:
    trunk/test/io/console/test_io_console.rb
Index: test/io/console/test_io_console.rb
===================================================================
--- test/io/console/test_io_console.rb	(revision 48986)
+++ test/io/console/test_io_console.rb	(revision 48987)
@@ -254,7 +254,7 @@ class TestIO_Console < Test::Unit::TestC https://github.com/ruby/ruby/blob/trunk/test/io/console/test_io_console.rb#L254
   rescue RuntimeError
     skip $!
   else
-    result = r.readlines(&:chomp)
+    result = r.readlines.map(&:chomp)
     Process.wait(pid)
     if block_given?
       yield result

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

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