ruby-changes:18005
From: yugui <ko1@a...>
Date: Thu, 2 Dec 2010 17:06:03 +0900 (JST)
Subject: [ruby-changes:18005] Ruby:r30025 (ruby_1_9_2): merges r29378 from trunk into ruby_1_9_2.
yugui 2010-12-02 17:05:33 +0900 (Thu, 02 Dec 2010) New Revision: 30025 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=30025 Log: merges r29378 from trunk into ruby_1_9_2. -- * win32/win32.c (rb_w32_getenv): should return NULL if specified name is empty. a patch from Heesob Park at [ruby-core:32650] Modified files: branches/ruby_1_9_2/ChangeLog branches/ruby_1_9_2/test/ruby/test_env.rb branches/ruby_1_9_2/version.h branches/ruby_1_9_2/win32/win32.c Index: ruby_1_9_2/ChangeLog =================================================================== --- ruby_1_9_2/ChangeLog (revision 30024) +++ ruby_1_9_2/ChangeLog (revision 30025) @@ -1,3 +1,8 @@ +Thu Sep 30 16:11:08 2010 NAKAMURA Usaku <usa@r...> + + * win32/win32.c (rb_w32_getenv): should return NULL if specified name + is empty. a patch from Heesob Park at [ruby-core:32650] + Sun Aug 29 13:22:43 2010 Nobuyoshi Nakada <nobu@r...> * vm.c (rb_thread_method_id_and_class): curried proc has no Index: ruby_1_9_2/win32/win32.c =================================================================== --- ruby_1_9_2/win32/win32.c (revision 30024) +++ ruby_1_9_2/win32/win32.c (revision 30025) @@ -3876,8 +3876,8 @@ int len = strlen(name); char *env; - if (envarea) - FreeEnvironmentStrings(envarea); + if (len == 0) return NULL; + if (envarea) FreeEnvironmentStrings(envarea); envarea = GetEnvironmentStrings(); if (!envarea) { map_errno(GetLastError()); Index: ruby_1_9_2/version.h =================================================================== --- ruby_1_9_2/version.h (revision 30024) +++ ruby_1_9_2/version.h (revision 30025) @@ -1,5 +1,5 @@ #define RUBY_VERSION "1.9.2" -#define RUBY_PATCHLEVEL 55 +#define RUBY_PATCHLEVEL 56 #define RUBY_VERSION_MAJOR 1 #define RUBY_VERSION_MINOR 9 #define RUBY_VERSION_TEENY 1 Index: ruby_1_9_2/test/ruby/test_env.rb =================================================================== --- ruby_1_9_2/test/ruby/test_env.rb (revision 30024) +++ ruby_1_9_2/test/ruby/test_env.rb (revision 30025) @@ -96,6 +96,7 @@ assert_raise(ArgumentError) { ENV["foo\0bar"] } ENV[PATH_ENV] = "" assert_equal("", ENV[PATH_ENV]) + assert_nil(ENV[""]) end def test_fetch -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/