summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-03-31 13:47:40 +0000
committernagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-03-31 13:47:40 +0000
commitab4c4d3e2b293cb40ca6a5f2a233ae3b5747e184 (patch)
treea7000ad8b4bc5b0e5b113fd32987775c65dcea6c
parent4d683d0566a16c3a7bc0d91bb92a36358613cf63 (diff)
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. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_1@50140 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--test/io/console/test_io_console.rb5
-rw-r--r--version.h2
2 files changed, 4 insertions, 3 deletions
diff --git a/test/io/console/test_io_console.rb b/test/io/console/test_io_console.rb
index baa44cfbef..91e1c8b162 100644
--- a/test/io/console/test_io_console.rb
+++ b/test/io/console/test_io_console.rb
@@ -248,12 +248,13 @@ class TestIO_Console < Test::Unit::TestCase
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
diff --git a/version.h b/version.h
index bd5dbad4aa..1a570a8e5b 100644
--- a/version.h
+++ b/version.h
@@ -1,6 +1,6 @@
#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