mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* hash.c (ruby_setenv): workaround for old Windows. a patch from
Heesob Park. [ruby-core:32353] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29377 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
c4087bcb12
commit
85bcd25877
2 changed files with 7 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
|||
Thu Sep 30 10:55:38 2010 NAKAMURA Usaku <usa@ruby-lang.org>
|
||||
|
||||
* hash.c (ruby_setenv): workaround for old Windows. a patch from
|
||||
Heesob Park. [ruby-core:32353]
|
||||
|
||||
Thu Sep 30 09:29:06 2010 NARUSE, Yui <naruse@ruby-lang.org>
|
||||
|
||||
* lib/uri/common.rb (URI.encode_www_form): change treatment of
|
||||
|
|
3
hash.c
3
hash.c
|
@ -2158,7 +2158,8 @@ ruby_setenv(const char *name, const char *value)
|
|||
rb_str_resize(buf, 0);
|
||||
if (!value || !*value) {
|
||||
/* putenv() doesn't handle empty value */
|
||||
if (!SetEnvironmentVariable(name,value)) goto fail;
|
||||
if (!SetEnvironmentVariable(name, value) &&
|
||||
GetLastError() != ERROR_ENVVAR_NOT_FOUND) goto fail;
|
||||
}
|
||||
if (failed) goto fail;
|
||||
#elif defined(HAVE_SETENV) && defined(HAVE_UNSETENV)
|
||||
|
|
Loading…
Reference in a new issue