summaryrefslogtreecommitdiff
path: root/test/test_open3.rb
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-12-12 06:48:46 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-12-12 06:48:46 +0000
commitc8cb0565a132f2f50f1ebd481c6b8dcec68c8c71 (patch)
tree660ca281f7efbd036c8cc98b18f6037c101a0092 /test/test_open3.rb
parent914a290324016b4f0b9a6080e334658cb3bf9f37 (diff)
downloadruby-c8cb0565a132f2f50f1ebd481c6b8dcec68c8c71.tar.gz
open3.rb don't use keyword splat (**).
revert r43582, r49173 and r49177. open3 arguments uses spawn-like keyword arguments. Both symbol and integer keys are used. ``` Open3.capture2(*command, :in => IO::NULL, 3 => IO::NULL) `` This style cannot be supported with keyword splat (**) since Ruby 2.6. Because Ruby 2.6 prohibits symbol/non-symbol key hash separation. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66352 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/test_open3.rb')
-rw-r--r--test/test_open3.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/test_open3.rb b/test/test_open3.rb
index bf1114972d..3eef5ae196 100644
--- a/test/test_open3.rb
+++ b/test/test_open3.rb
@@ -316,4 +316,9 @@ class TestOpen3 < Test::Unit::TestCase
}
end
+ def test_integer_and_symbol_key
+ command = [RUBY, '-e', 'puts "test_integer_and_symbol_key"']
+ out, status = Open3.capture2(*command, :in => IO::NULL, 3 => IO::NULL)
+ assert_equal("test_integer_and_symbol_key\n", out)
+ end
end