# \[Ruby 1.9 - Bug #3305\]\[Closed\] test processのMANDATORY ENVS

**URL:** <https://www.ruby-forum.com/t/ruby-1-9-bug-3305-closed-test-process-mandatory-envs/208151>\
**Category:** Development\
**Created:** [June 11, 2011, 7:38am UTC](https://www.ruby-forum.com/t/ruby-1-9-bug-3305-closed-test-process-mandatory-envs/208151 "2011-06-11T07:38:39Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![luislavena](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/0ea827/32.png) [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Post date:** [June 11, 2011, 7:38am UTC](https://www.ruby-forum.com/t/ruby-1-9-bug-3305-closed-test-process-mandatory-envs/208151/1 "2011-06-11T07:38:39Z")

</div>

Issue #3305 has been updated by Masaya T…

Status changed from Assigned to Closed

## 発症しなくなっているためcloseします。

Bug #3305: test\_processのMANDATORY\_ENVS

> **[Bug #3305: test\_processのMANDATORY\_ENVS - Ruby master - Ruby Issue Tracking...](https://redmine.ruby-lang.org/issues/3305)**
>
> Redmine

Author: Masaya T.  
Status: Closed  
Priority: Low  
Assignee: Usaku NAKAMURA  
Category: test  
Target version: 1.9.x  
ruby -v: ruby 1.9.2dev (2010-05-16 revision 27850) [i386-mswin32\_90]

=begin  
現状だと以下のようになります。OSはWindowsXP SP3です。

> c:\bin\ruby.exe test\ruby\test\_process.rb  
> (snip)

1. Failure:  
test\_execopts\_env(TestProcess) [test/ruby/test\_process.rb:252]:  
\<“PATH\n”\> expected but was  
\<“”\>.  
(snip)
2. Failure:  
test\_execopts\_unsetenv\_others(TestProcess)  
[test/ruby/test\_process.rb:290]:  
\<“A=B\n”\> expected but was  
\<“”\>.  
(snip)  
56 tests, 132 assertions, 2 failures, 0 errors, 8 skips

どうやら、起動時にSystemRootが必要なようで以下で直ります。

# Index: test/ruby/test\_process.rb

— test/ruby/test\_process.rb (リビジョン 27851)  
+++ test/ruby/test\_process.rb (作業コピー)  
@@ -222,7 +222,7 @@  
when /linux/  
MANDATORY\_ENVS \<\< ‘LD\_PRELOAD’  
when /mswin|mingw/

- MANDATORY\_ENVS.concat(%w[HOME USER TMPDIR])

- MANDATORY\_ENVS.concat(%w[HOME USER TMPDIR SystemRoot])  
end  
if e = RbConfig::CONFIG[‘LIBPATHENV’]  
MANDATORY\_ENVS \<\< e

結果、

> c:\bin\ruby.exe test\ruby\test\_process.rb  
> (snip)  
> 56 tests, 143 assertions, 0 failures, 0 errors, 8 skips  
> =end
