ruby-changes:29796
From: usa <ko1@a...>
Date: Tue, 9 Jul 2013 10:46:11 +0900 (JST)
Subject: [ruby-changes:29796] usa:r41848 (trunk): * ext/{dl,fiddle}/win32/lib/win32/registry.rb: typos.
usa 2013-07-09 10:45:57 +0900 (Tue, 09 Jul 2013) New Revision: 41848 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=41848 Log: * ext/{dl,fiddle}/win32/lib/win32/registry.rb: typos. Modified files: trunk/ext/dl/win32/lib/win32/registry.rb trunk/ext/fiddle/win32/lib/win32/registry.rb Index: ext/dl/win32/lib/win32/registry.rb =================================================================== --- ext/dl/win32/lib/win32/registry.rb (revision 41847) +++ ext/dl/win32/lib/win32/registry.rb (revision 41848) @@ -173,7 +173,7 @@ For detail, see the MSDN[http://msdn.mic https://github.com/ruby/ruby/blob/trunk/ext/dl/win32/lib/win32/registry.rb#L173 @code = code msg = WCHAR_SPACE * 1024 len = FormatMessageW.call(0x1200, 0, code, 0, msg, 1024, 0) - msg = msg[0, len].encode + msg = msg[0, len].encode('locale') super msg.tr("\r".encode(msg.encoding), '').chomp end attr_reader :code @@ -340,7 +340,7 @@ For detail, see the MSDN[http://msdn.mic https://github.com/ruby/ruby/blob/trunk/ext/dl/win32/lib/win32/registry.rb#L340 # For detail, see expandEnvironmentStrings[http://msdn.microsoft.com/library/en-us/sysinfo/base/expandenvironmentstrings.asp] \Win32 \API. # def self.expand_environ(str) - str.gsub(Regexp.compile("%([^%]+)%".encode(str.encoding))) { (e = ENV[$1.encode(locale)], e.encode(str.encoding) if e) || (e = ENV[$1.encode(locale).upcase], e.encode(str.encoding) if e) || $& } + str.gsub(Regexp.compile("%([^%]+)%".encode(str.encoding))) { (e = ENV[$1.encode('locale')], e.encode(str.encoding) if e) || (e = ENV[$1.encode('locale').upcase], e.encode(str.encoding) if e) || $& } end @@type2name = { } Index: ext/fiddle/win32/lib/win32/registry.rb =================================================================== --- ext/fiddle/win32/lib/win32/registry.rb (revision 41847) +++ ext/fiddle/win32/lib/win32/registry.rb (revision 41848) @@ -173,7 +173,7 @@ For detail, see the MSDN[http://msdn.mic https://github.com/ruby/ruby/blob/trunk/ext/fiddle/win32/lib/win32/registry.rb#L173 @code = code msg = WCHAR_SPACE * 1024 len = FormatMessageW.call(0x1200, 0, code, 0, msg, 1024, 0) - msg = msg[0, len].encode + msg = msg[0, len].encode('locale') super msg.tr("\r".encode(msg.encoding), '').chomp end attr_reader :code @@ -340,7 +340,7 @@ For detail, see the MSDN[http://msdn.mic https://github.com/ruby/ruby/blob/trunk/ext/fiddle/win32/lib/win32/registry.rb#L340 # For detail, see expandEnvironmentStrings[http://msdn.microsoft.com/library/en-us/sysinfo/base/expandenvironmentstrings.asp] \Win32 \API. # def self.expand_environ(str) - str.gsub(Regexp.compile("%([^%]+)%".encode(str.encoding))) { (e = ENV[$1.encode(locale)], e.encode(str.encoding) if e) || (e = ENV[$1.encode(locale).upcase], e.encode(str.encoding) if e) || $& } + str.gsub(Regexp.compile("%([^%]+)%".encode(str.encoding))) { (e = ENV[$1.encode('locale')], e.encode(str.encoding) if e) || (e = ENV[$1.encode('locale').upcase], e.encode(str.encoding) if e) || $& } end @@type2name = { } -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/