summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
Diffstat (limited to 'ext')
-rw-r--r--ext/dl/win32/lib/win32/registry.rb2
-rw-r--r--ext/fiddle/win32/lib/win32/registry.rb2
2 files changed, 2 insertions, 2 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
diff --git a/ext/fiddle/win32/lib/win32/registry.rb b/ext/fiddle/win32/lib/win32/registry.rb
index 099bfd77514..1c881ee3002 100644
--- a/ext/fiddle/win32/lib/win32/registry.rb
+++ b/ext/fiddle/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