ruby-changes:17372
From: usa <ko1@a...>
Date: Thu, 30 Sep 2010 10:57:26 +0900 (JST)
Subject: [ruby-changes:17372] Ruby:r29377 (trunk): * hash.c (ruby_setenv): workaround for old Windows. a patch from
usa 2010-09-30 10:57:17 +0900 (Thu, 30 Sep 2010) New Revision: 29377 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=29377 Log: * hash.c (ruby_setenv): workaround for old Windows. a patch from Heesob Park. [ruby-core:32353] Modified files: trunk/ChangeLog trunk/hash.c Index: ChangeLog =================================================================== --- ChangeLog (revision 29376) +++ ChangeLog (revision 29377) @@ -1,3 +1,8 @@ +Thu Sep 30 10:55:38 2010 NAKAMURA Usaku <usa@r...> + + * 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@r...> * lib/uri/common.rb (URI.encode_www_form): change treatment of Index: hash.c =================================================================== --- hash.c (revision 29376) +++ hash.c (revision 29377) @@ -2158,7 +2158,8 @@ 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) -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/