Bug #1947: rb_w32_getenv has naive implementation
http://redmine.ruby-lang.org/issues/show/1947

Author: Vit Ondruch
Status: Open, Priority: Normal
Category: core
ruby -v: ruby 1.9.2dev (2009-08-04) [i386-mswin32_90]

In change set 10650 (and according to discussion in ruby-talk:205123), the rb_w32_getenv implementation was changed. However, I believe that the correct approach according to windows documentation should be to call GetEnvironmentVariable and check GetLastError. If the variable exists, then S_OK is returned or some error code in other case. Call to GetEnvironmentStrings and home made enumeration is cumbersome.


----------------------------------------
http://redmine.ruby-lang.org