* 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:
parent
47dfa853ef
commit
491b450f93
@ -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>
|
Fri Dec 5 11:54:45 2003 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
* ext/stringio/stringio.c (strio_read): follow IO#read.
|
* ext/stringio/stringio.c (strio_read): follow IO#read.
|
||||||
|
@ -8,7 +8,13 @@ $KCODE = 'none'
|
|||||||
class TestPipe < Test::Unit::TestCase
|
class TestPipe < Test::Unit::TestCase
|
||||||
include TestEOF
|
include TestEOF
|
||||||
def open_file(content)
|
def open_file(content)
|
||||||
f = IO.popen("echo -n #{content}")
|
r, w = IO.pipe
|
||||||
yield f
|
w << content
|
||||||
|
w.close
|
||||||
|
begin
|
||||||
|
yield r
|
||||||
|
ensure
|
||||||
|
r.close
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user