summaryrefslogtreecommitdiffstats
path: root/test/ruby
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-04-26 12:52:25 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-04-26 12:52:25 +0000
commitec612f96546c7bd185ab95baf32850423f57cee5 (patch)
treec8b543090edb6016a11fda3b22c55b4eb5b01cea /test/ruby
parentd97052c067fcf987a8f4d1cee1733fb0d7f2edab (diff)
downloadruby-ec612f96546c7bd185ab95baf32850423f57cee5.tar.gz
ruby-ec612f96546c7bd185ab95baf32850423f57cee5.tar.xz
ruby-ec612f96546c7bd185ab95baf32850423f57cee5.zip
* include/ruby/intern.h (rb_hash_dup): declared.
* hash.c (rb_hash_dup): new function. * process.c (rb_spawn_internal): don't modify option hash. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@16210 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby')
-rw-r--r--test/ruby/test_process.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/ruby/test_process.rb b/test/ruby/test_process.rb
index e68f1070e..36cc5d14a 100644
--- a/test/ruby/test_process.rb
+++ b/test/ruby/test_process.rb
@@ -500,6 +500,21 @@ class TestProcess < Test::Unit::TestCase
}
end
+ def test_execopts_modification
+ h = {}
+ Process.wait spawn(EnvUtil.rubybin, '-e', '', h)
+ assert_equal({}, h)
+
+ h = {}
+ system(EnvUtil.rubybin, '-e', '', h)
+ assert_equal({}, h)
+
+ h = {}
+ io = IO.popen([EnvUtil.rubybin, '-e', '', h])
+ io.close
+ assert_equal({}, h)
+ end
+
def test_system
str = "echo fofo"
assert_nil(system([str, str]))