mirror of
https://github.com/ruby/ruby.git
synced 2025-09-19 18:43:59 +02:00
* 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: svn+ssh://ci.ruby-lang.org/ruby/trunk@16210 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
6fb36ebab0
commit
514715250a
5 changed files with 41 additions and 0 deletions
|
@ -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]))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue