summaryrefslogtreecommitdiff
path: root/ext/dl
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-07-09 00:49:44 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-07-09 00:49:44 +0000
commitd9726121e5ad56521a6769cd5a855eb45ef33ed5 (patch)
tree245cb615afdce47158a338ce5a7e31ed1dc6a2e1 /ext/dl
parent7083cebeaea83096128fc5ccb5f60bfbe5bcc939 (diff)
* ext/dl/win32/lib/win32/registry.rb (Win32::Registry.expand_environ):
use suitable encoding for the string. fixed a test-all error of r41838. * ext/fiddle/win32/lib/win32/registry.rb: same changes of r41838 and this revision of dl's win32/registry.rb. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41844 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/dl')
-rw-r--r--ext/dl/win32/lib/win32/registry.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/dl/win32/lib/win32/registry.rb b/ext/dl/win32/lib/win32/registry.rb
index ce7c7d2..cca578c 100644
--- a/ext/dl/win32/lib/win32/registry.rb
+++ b/ext/dl/win32/lib/win32/registry.rb
@@ -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(/%([^%]+)%/) { ENV[$1] || ENV[$1.upcase] || $& }
+ str.gsub(Regexp.compile("%([^%]+)%".encode(str.encoding))) { ENV[$1] || ENV[$1.upcase] || $& }
end
@@type2name = { }