diff options
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) |