summaryrefslogtreecommitdiff
path: root/ext/dl/win32/lib/win32/registry.rb
diff options
context:
space:
mode:
Diffstat (limited to 'ext/dl/win32/lib/win32/registry.rb')
-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 = { }