1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* test/ruby/test_pipe.rb: use IO.pipe instead of IO.popen.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5117 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
akr 2003-12-05 04:18:37 +00:00
parent 47dfa853ef
commit 491b450f93
2 changed files with 12 additions and 2 deletions

View file

@ -1,3 +1,7 @@
Fri Dec 5 13:17:30 2003 Tanaka Akira <akr@m17n.org>
* test/ruby/test_pipe.rb: use IO.pipe instead of IO.popen.
Fri Dec 5 11:54:45 2003 Nobuyoshi Nakada <nobu@ruby-lang.org>
* ext/stringio/stringio.c (strio_read): follow IO#read.

View file

@ -8,7 +8,13 @@ $KCODE = 'none'
class TestPipe < Test::Unit::TestCase
include TestEOF
def open_file(content)
f = IO.popen("echo -n #{content}")
yield f
r, w = IO.pipe
w << content
w.close
begin
yield r
ensure
r.close
end
end
end