summaryrefslogtreecommitdiff
path: root/test/-ext-/symbol/test_inadvertent_creation.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/-ext-/symbol/test_inadvertent_creation.rb')
-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 14e6abd..abcb5d9 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