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

ruby-changes:38059

From: nagachika <ko1@a...>
Date: Tue, 31 Mar 2015 22:47:59 +0900 (JST)
Subject: [ruby-changes:38059] nagachika:r50140 (ruby_2_1): merge revision(s) r48987, r48989: [Backport #10646]

nagachika	2015-03-31 22:47:40 +0900 (Tue, 31 Mar 2015)

  New Revision: 50140

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

  Log:
    merge revision(s) r48987,r48989: [Backport #10646]
    
    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 directories:
    branches/ruby_2_1/
  Modified files:
    branches/ruby_2_1/test/io/console/test_io_console.rb
    branches/ruby_2_1/version.h
Index: ruby_2_1/version.h
===================================================================
--- ruby_2_1/version.h	(revision 50139)
+++ ruby_2_1/version.h	(revision 50140)
@@ -1,6 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_1/version.h#L1
 #define RUBY_VERSION "2.1.5"
 #define RUBY_RELEASE_DATE "2015-03-31"
-#define RUBY_PATCHLEVEL 328
+#define RUBY_PATCHLEVEL 329
 
 #define RUBY_RELEASE_YEAR 2015
 #define RUBY_RELEASE_MONTH 3
Index: ruby_2_1/test/io/console/test_io_console.rb
===================================================================
--- ruby_2_1/test/io/console/test_io_console.rb	(revision 50139)
+++ ruby_2_1/test/io/console/test_io_console.rb	(revision 50140)
@@ -248,12 +248,13 @@ class TestIO_Console < Test::Unit::TestC https://github.com/ruby/ruby/blob/trunk/ruby_2_1/test/io/console/test_io_console.rb#L248
     s.close if s
   end
 
-  def run_pty(src)
+  def run_pty(src, n = 1)
     r, w, pid = PTY.spawn(EnvUtil.rubybin, "-rio/console", "-e", src)
   rescue RuntimeError
     skip $!
   else
-    result = r.readlines(&:chomp)
+    result = []
+    n.times {result << r.gets.chomp}
     Process.wait(pid)
     if block_given?
       yield result

Property changes on: ruby_2_1
___________________________________________________________________
Modified: svn:mergeinfo
   Merged /trunk:r48987,48989


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

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