* 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
This commit is contained in:
parent
b16b5afa24
commit
a189f7f6c8
@ -173,7 +173,7 @@ For detail, see the MSDN[http://msdn.microsoft.com/library/en-us/sysinfo/base/pr
|
|||||||
@code = code
|
@code = code
|
||||||
msg = WCHAR_SPACE * 1024
|
msg = WCHAR_SPACE * 1024
|
||||||
len = FormatMessageW.call(0x1200, 0, code, 0, msg, 1024, 0)
|
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
|
super msg.tr("\r".encode(msg.encoding), '').chomp
|
||||||
end
|
end
|
||||||
attr_reader :code
|
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.
|
# For detail, see expandEnvironmentStrings[http://msdn.microsoft.com/library/en-us/sysinfo/base/expandenvironmentstrings.asp] \Win32 \API.
|
||||||
#
|
#
|
||||||
def self.expand_environ(str)
|
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
|
end
|
||||||
|
|
||||||
@@type2name = { }
|
@@type2name = { }
|
||||||
|
@ -173,7 +173,7 @@ For detail, see the MSDN[http://msdn.microsoft.com/library/en-us/sysinfo/base/pr
|
|||||||
@code = code
|
@code = code
|
||||||
msg = WCHAR_SPACE * 1024
|
msg = WCHAR_SPACE * 1024
|
||||||
len = FormatMessageW.call(0x1200, 0, code, 0, msg, 1024, 0)
|
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
|
super msg.tr("\r".encode(msg.encoding), '').chomp
|
||||||
end
|
end
|
||||||
attr_reader :code
|
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.
|
# For detail, see expandEnvironmentStrings[http://msdn.microsoft.com/library/en-us/sysinfo/base/expandenvironmentstrings.asp] \Win32 \API.
|
||||||
#
|
#
|
||||||
def self.expand_environ(str)
|
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
|
end
|
||||||
|
|
||||||
@@type2name = { }
|
@@type2name = { }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user