diff options
author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-07-09 01:45:57 +0000 |
---|---|---|
committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-07-09 01:45:57 +0000 |
commit | a189f7f6c858836d7957ab2d003ee40dd049cc61 (patch) | |
tree | 35c38d1738524db51162f3d0ca024f295c483114 | |
parent | b16b5afa2446c1b8663c38e09b1341d9f1e6afe5 (diff) | |
download | ruby-a189f7f6c858836d7957ab2d003ee40dd049cc61.tar.gz |
* ext/{dl,fiddle}/win32/lib/win32/registry.rb: typos.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41848 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ext/dl/win32/lib/win32/registry.rb | 4 | ||||
-rw-r--r-- | ext/fiddle/win32/lib/win32/registry.rb | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/ext/dl/win32/lib/win32/registry.rb b/ext/dl/win32/lib/win32/registry.rb index 472f8228b3..d9ba5519f9 100644 --- a/ext/dl/win32/lib/win32/registry.rb +++ b/ext/dl/win32/lib/win32/registry.rb @@ -173,7 +173,7 @@ For detail, see the MSDN[http://msdn.microsoft.com/library/en-us/sysinfo/base/pr @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.microsoft.com/library/en-us/sysinfo/base/pr # 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 = { } diff --git a/ext/fiddle/win32/lib/win32/registry.rb b/ext/fiddle/win32/lib/win32/registry.rb index 21ee6bb030..401a795df9 100644 --- a/ext/fiddle/win32/lib/win32/registry.rb +++ b/ext/fiddle/win32/lib/win32/registry.rb @@ -173,7 +173,7 @@ For detail, see the MSDN[http://msdn.microsoft.com/library/en-us/sysinfo/base/pr @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.microsoft.com/library/en-us/sysinfo/base/pr # 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 = { } |