mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* test/ruby/test_thread.rb: fix typos.
* test/ruby/envutil.rb (rubyexec): move Open3.popen3 call into timeout block. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16182 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
c8d27afcd6
commit
9b694aaa85
3 changed files with 21 additions and 13 deletions
|
@ -43,16 +43,17 @@ module EnvUtil
|
|||
c = "C"
|
||||
env = {}
|
||||
LANG_ENVS.each {|lc| env[lc], ENV[lc] = ENV[lc], c}
|
||||
stdin, stdout, stderr = Open3.popen3(*([ruby] + args))
|
||||
env.each_pair {|lc, v|
|
||||
if v
|
||||
ENV[lc] = v
|
||||
else
|
||||
ENV.delete(lc)
|
||||
end
|
||||
}
|
||||
env = nil
|
||||
stdin = stdout = stderr = nil
|
||||
Timeout.timeout(10) do
|
||||
stdin, stdout, stderr = Open3.popen3(*([ruby] + args))
|
||||
env.each_pair {|lc, v|
|
||||
if v
|
||||
ENV[lc] = v
|
||||
else
|
||||
ENV.delete(lc)
|
||||
end
|
||||
}
|
||||
env = nil
|
||||
yield(stdin, stdout, stderr)
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue