[前][次][番号順一覧][スレッド一覧]

ruby-changes:15577

From: wanabe <ko1@a...>
Date: Sun, 25 Apr 2010 11:11:50 +0900 (JST)
Subject: [ruby-changes:15577] Ruby:r27483 (trunk): * hash.c (ruby_setenv): putenv on msvcrt.dll can't remove empty value.

wanabe	2010-04-25 11:08:36 +0900 (Sun, 25 Apr 2010)

  New Revision: 27483

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=27483

  Log:
    * hash.c (ruby_setenv): putenv on msvcrt.dll can't remove empty value.

  Modified files:
    trunk/ChangeLog
    trunk/hash.c

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 27482)
+++ ChangeLog	(revision 27483)
@@ -1,3 +1,7 @@
+Sun Apr 25 11:02:20 2010  wanabe  <s.wanabe@g...>
+
+	* hash.c (ruby_setenv): putenv on msvcrt.dll can't remove empty value.
+
 Sat Apr 24 23:40:50 2010  Tanaka Akira  <akr@f...>
 
 	* lib/pp.rb: use [""].pack("p").size to detect the pointer size.
Index: hash.c
===================================================================
--- hash.c	(revision 27482)
+++ hash.c	(revision 27483)
@@ -2129,6 +2129,7 @@
 	buf = ALLOCA_N(char, len);
 	snprintf(buf, len, "%s=", name);
 	putenv(buf);
+	SetEnvironmentVariable(name, 0);
     }
 #elif defined(HAVE_SETENV) && defined(HAVE_UNSETENV)
 #undef setenv

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]