* process.c (rb_proc_exec_e): extended version of rb_proc_exec() to

call execle().
  (rb_proc_exec): use rb_proc_exec_e().
  (rb_exec_err): use rb_proc_exec_e().


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35884 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
akr 2012-06-03 11:12:20 +00:00
parent 190d319dab
commit 033e2187c6
3 changed files with 35 additions and 7 deletions

View file

@ -309,6 +309,18 @@ class TestProcess < Test::Unit::TestCase
assert_equal(nil, ENV["mgg"], "[ruby-core:44093] [ruby-trunk - Bug #6249]")
end
def test_execopts_env_single_word
with_tmpchdir {|d|
open("test_execopts_env_single_word.rb", "w") {|f|
f.puts "print ENV['hgga']"
}
system({"hgga"=>"ugu"}, RUBY,
:in => 'test_execopts_env_single_word.rb',
:out => 'test_execopts_env_single_word.out')
assert_equal('ugu', File.read('test_execopts_env_single_word.out'))
}
end
def test_execopts_unsetenv_others
h = {}
MANDATORY_ENVS.each {|k| e = ENV[k] and h[k] = e}