aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_open3.rb
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-01-07 15:29:28 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-01-07 15:29:28 +0000
commit1ade9cad02a366a5f54a410a9f6337c92839d36e (patch)
tree34b9d10844aee643bdf2336f72bbc0c079b3d554 /test/test_open3.rb
parent48ad25568f0dfd937303cae0221a5818a0a609b3 (diff)
downloadruby-1ade9cad02a366a5f54a410a9f6337c92839d36e.tar.gz
* lib/open3.rb: Open3 properly passes non-keyword hash args to spawn.
Fixed by Josh Cheek. [Fix GH-808] Related to [ruby-core:67347] [Bug #10699] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49173 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/test_open3.rb')
-rw-r--r--test/test_open3.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/test_open3.rb b/test/test_open3.rb
index e560fbedb4..a268822bed 100644
--- a/test/test_open3.rb
+++ b/test/test_open3.rb
@@ -80,6 +80,14 @@ class TestOpen3 < Test::Unit::TestCase
end
end
+ def test_numeric_file_descriptors
+ with_pipe { |r, w|
+ Open3.popen3(RUBY, '-e', 'IO.open(3).puts "foo"', 3 => w) {|i,o,e,t|
+ assert_equal("foo\n", r.gets, "[GH-808] [ruby-core:67347] [Bug #10699]")
+ }
+ }
+ end
+
def with_pipe
r, w = IO.pipe
yield r, w