ruby-changes:39539
From: usa <ko1@a...>
Date: Mon, 17 Aug 2015 23:28:20 +0900 (JST)
Subject: [ruby-changes:39539] usa:r51620 (ruby_2_1): merge revision(s) 51575, 51584: [Backport #11439]
usa 2015-08-17 23:27:58 +0900 (Mon, 17 Aug 2015) New Revision: 51620 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=51620 Log: merge revision(s) 51575,51584: [Backport #11439] * ext/win32/lib/win32/registry.rb (API#SetValue): add terminator size, not 1 byte. [ruby-core:70365] [Bug #11439] * ext/win32/lib/win32/registry.rb (API#SetValue): data size should be in bytes, not in chars. [ruby-core:70365] [Bug #11439] Modified directories: branches/ruby_2_1/ Modified files: branches/ruby_2_1/ChangeLog branches/ruby_2_1/ext/win32/lib/win32/registry.rb branches/ruby_2_1/version.h Index: ruby_2_1/ChangeLog =================================================================== --- ruby_2_1/ChangeLog (revision 51619) +++ ruby_2_1/ChangeLog (revision 51620) @@ -1,3 +1,13 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_1/ChangeLog#L1 +Mon Aug 17 23:27:45 2015 Nobuyoshi Nakada <nobu@r...> + + * ext/win32/lib/win32/registry.rb (API#SetValue): data size should + be in bytes, not in chars. [ruby-core:70365] [Bug #11439] + +Mon Aug 17 23:27:45 2015 Nobuyoshi Nakada <nobu@r...> + + * ext/win32/lib/win32/registry.rb (API#SetValue): add terminator + size, not 1 byte. [ruby-core:70365] [Bug #11439] + Mon Aug 17 17:57:12 2015 Nobuyoshi Nakada <nobu@r...> * re.c (rb_memsearch): should match only char boundaries in wide Index: ruby_2_1/ext/win32/lib/win32/registry.rb =================================================================== --- ruby_2_1/ext/win32/lib/win32/registry.rb (revision 51619) +++ ruby_2_1/ext/win32/lib/win32/registry.rb (revision 51620) @@ -315,7 +315,7 @@ For detail, see the MSDN[http://msdn.mic https://github.com/ruby/ruby/blob/trunk/ruby_2_1/ext/win32/lib/win32/registry.rb#L315 case type when REG_SZ, REG_EXPAND_SZ, REG_MULTI_SZ data = data.encode(WCHAR) - size ||= data.size + 1 + size ||= data.bytesize + WCHAR_SIZE end check RegSetValueExW.call(hkey, make_wstr(name), 0, type, data, size) end Index: ruby_2_1/version.h =================================================================== --- ruby_2_1/version.h (revision 51619) +++ ruby_2_1/version.h (revision 51620) @@ -1,6 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_1/version.h#L1 #define RUBY_VERSION "2.1.7" #define RUBY_RELEASE_DATE "2015-08-17" -#define RUBY_PATCHLEVEL 398 +#define RUBY_PATCHLEVEL 399 #define RUBY_RELEASE_YEAR 2015 #define RUBY_RELEASE_MONTH 8 Property changes on: ruby_2_1 ___________________________________________________________________ Modified: svn:mergeinfo Merged /trunk:r51575,51584 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/