From f1cb0f2f547a0b49b8e919aa84c8f233aec150ae Mon Sep 17 00:00:00 2001 From: akr Date: Wed, 10 Dec 2008 17:24:42 +0000 Subject: * lib/open3.rb (Open3.pipeline_start): return an array of threads if a block is not given. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@20618 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/test_open3.rb | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'test') diff --git a/test/test_open3.rb b/test/test_open3.rb index d891eed11..8f355ccb7 100644 --- a/test/test_open3.rb +++ b/test/test_open3.rb @@ -214,6 +214,15 @@ class TestOpen3 < Test::Unit::TestCase } end + def test_pipeline_start_noblock + ts = Open3.pipeline_start([RUBY, '-e', '']) + assert_kind_of(Array, ts) + assert_equal(1, ts.length) + ts.each {|t| assert_kind_of(Thread, t) } + t = ts[0] + assert(t.value.success?) + end + def test_pipeline command = [RUBY, '-e', 's=STDIN.read; print s[1..-1]; exit s[0] == ?t'] str = 'ttftff' -- cgit