aboutsummaryrefslogtreecommitdiffstats
path: root/test/-ext-/symbol
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-11-24 03:44:45 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-11-24 03:44:45 +0000
commit09fbd56e6f1774254a2f1999897231d0ff5ae84b (patch)
treee68e110133db6dd032bbbeb6e6a4c363d991b571 /test/-ext-/symbol
parenta6755b6e5feb09bdcd50409b0af377779ec02b91 (diff)
downloadruby-09fbd56e6f1774254a2f1999897231d0ff5ae84b.tar.gz
process.c: get rid of inadvertent ID pindown
* process.c (check_exec_redirect_fd, check_exec_redirect), (rb_execarg_addopt): get rid of inadvertent ID pindown. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48552 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/-ext-/symbol')
-rw-r--r--test/-ext-/symbol/test_inadvertent_creation.rb32
1 files changed, 32 insertions, 0 deletions
diff --git a/test/-ext-/symbol/test_inadvertent_creation.rb b/test/-ext-/symbol/test_inadvertent_creation.rb
index 14e6abd7a3..abcb5d9ccb 100644
--- a/test/-ext-/symbol/test_inadvertent_creation.rb
+++ b/test/-ext-/symbol/test_inadvertent_creation.rb
@@ -320,5 +320,37 @@ module Test_Symbol
end
end;
end
+
+ def test_execopt_key
+ name = noninterned_name.intern
+ assert_raise(ArgumentError) {
+ system(".", name => nil)
+ }
+ assert_not_pinneddown(name)
+ end
+
+ def test_execopt_redirect_value
+ name = noninterned_name.intern
+ assert_raise(ArgumentError) {
+ system(".", [] => name)
+ }
+ assert_not_pinneddown(name)
+ end
+
+ def test_execopt_redirect_path
+ name = noninterned_name.intern
+ assert_raise(TypeError) {
+ system(".", [] => [name, 0])
+ }
+ assert_not_pinneddown(name)
+ end
+
+ def test_execopt_redirect_symbol
+ name = noninterned_name.intern
+ assert_raise(ArgumentError) {
+ system(".", in: name)
+ }
+ assert_not_pinneddown(name)
+ end
end
end