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 cca578ce013..abe9e36f9bd 100644
--- a/ext/dl/win32/lib/win32/registry.rb
+++ b/ext/dl/win32/lib/win32/registry.rb
@@ -174,7 +174,7 @@ For detail, see the MSDN[http://msdn.microsoft.com/library/en-us/sysinfo/base/pr
msg = WCHAR_SPACE * 1024
len = FormatMessageW.call(0x1200, 0, code, 0, msg, 1024, 0)
msg = msg[0, len].encode
- super msg.tr("\r", '').chomp
+ super msg.tr("\r".encode(msg.encoding), '').chomp
end
attr_reader :code
end