diff options
author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-09-30 01:57:17 +0000 |
---|---|---|
committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-09-30 01:57:17 +0000 |
commit | 85bcd2587794dbe653523847bc01cab4948be2d4 (patch) | |
tree | 2c3315a6fc04c82b5d341db9bb499f3e740e78b9 /hash.c | |
parent | c4087bcb129535303c53a6a0fffaff36b071174b (diff) |
* 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
Diffstat (limited to 'hash.c')
-rw-r--r-- | hash.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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) |