ruby-changes:30950
From: nobu <ko1@a...>
Date: Tue, 24 Sep 2013 16:35:28 +0900 (JST)
Subject: [ruby-changes:30950] nobu:r43029 (trunk): win32/registry.rb: fix runtime errors
nobu 2013-09-24 16:35:12 +0900 (Tue, 24 Sep 2013) New Revision: 43029 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=43029 Log: win32/registry.rb: fix runtime errors * ext/win32/lib/win32/registry.rb (Win32::Registry::API#EnumKey): size of the name is in WCHARs, not in bytes. Modified files: trunk/ChangeLog trunk/ext/win32/lib/win32/registry.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 43028) +++ ChangeLog (revision 43029) @@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Tue Sep 24 16:35:09 2013 Nobuyoshi Nakada <nobu@r...> + + * ext/win32/lib/win32/registry.rb (Win32::Registry::API#EnumKey): + size of the name is in WCHARs, not in bytes. + Tue Sep 24 14:07:00 2013 Charlie Somerville <charliesome@r...> * gc.c (free_method_cache_entry_i): unused function @@ -31,7 +36,7 @@ Tue Sep 24 12:51:07 2013 Nobuyoshi Naka https://github.com/ruby/ruby/blob/trunk/ChangeLog#L36 Constants. * ext/win32/lib/win32/registry.rb (Win32::Registry::API#EnumValue): - size of the name is in WCHARs, not in bytes + size of the name is in WCHARs, not in bytes. Mon Sep 23 22:16:09 2013 Nobuyoshi Nakada <nobu@r...> Index: ext/win32/lib/win32/registry.rb =================================================================== --- ext/win32/lib/win32/registry.rb (revision 43028) +++ ext/win32/lib/win32/registry.rb (revision 43029) @@ -298,7 +298,7 @@ For detail, see the MSDN[http://msdn.mic https://github.com/ruby/ruby/blob/trunk/ext/win32/lib/win32/registry.rb#L298 size = packdw(Constants::MAX_KEY_LENGTH) wtime = ' ' * 8 check RegEnumKeyExW.call(hkey, index, name, size, 0, 0, 0, wtime) - [ name[0, unpackdw(size)/WCHAR_SIZE].encode, unpackqw(wtime) ] + [ name[0, unpackdw(size)].encode, unpackqw(wtime) ] end def QueryValue(hkey, name) -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/