Feature #1947

rb_w32_getenv has naive implementation

Added by Vit Ondruch about 6 years ago. Updated over 4 years ago.

[ruby-core:24949]
Status:Rejected
Priority:Normal
Assignee:Usaku NAKAMURA

Description

=begin
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.
=end

History

#1 Updated by Usaku NAKAMURA about 6 years ago

  • Category set to core
  • Status changed from Open to Rejected
  • Assignee set to Usaku NAKAMURA
  • Priority changed from Normal to 3
  • Target version set to 2.0.0

=begin
There is a patch to use GetEnvironmentVariable() instead of using GetEnvironmentStrings(), written by Nobu.

http://www.atdot.net/sp/readonly/hk3kok

However, this patch is as you see complex at the same level of current code.
Nobu and I discussed about this issue, and reached to a conclusion that we maintain the status quo for the time being.
=end

Also available in: Atom PDF