Skip to content

Commit ab4c4d3

Browse files
committed
merge revision(s) r48987,r48989: [Backport ruby#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
1 parent 4d683d0 commit ab4c4d3

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

test/io/console/test_io_console.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -248,12 +248,13 @@ def helper
248248
s.close if s
249249
end
250250

251-
def run_pty(src)
251+
def run_pty(src, n = 1)
252252
r, w, pid = PTY.spawn(EnvUtil.rubybin, "-rio/console", "-e", src)
253253
rescue RuntimeError
254254
skip $!
255255
else
256-
result = r.readlines(&:chomp)
256+
result = []
257+
n.times {result << r.gets.chomp}
257258
Process.wait(pid)
258259
if block_given?
259260
yield result

version.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#define RUBY_VERSION "2.1.5"
22
#define RUBY_RELEASE_DATE "2015-03-31"
3-
#define RUBY_PATCHLEVEL 328
3+
#define RUBY_PATCHLEVEL 329
44

55
#define RUBY_RELEASE_YEAR 2015
66
#define RUBY_RELEASE_MONTH 3

0 commit comments

Comments
 (0)