summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Aaron <[email protected]>2024-04-26 16:10:42 +0100
committerGitHub <[email protected]>2024-04-26 15:10:42 +0000
commit67b79d484f97033d362305607f0031ef7fa39f12 (patch)
treeb3ae6a507a9177c9afe6d80d0af4c1fc1070ee3d
parent69c1bd90be2d1502ace02601fff4dd362604c13f (diff)
Enable Ruby to run on Windows with frozen string literals
-rw-r--r--ext/win32/lib/win32/registry.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/win32/lib/win32/registry.rb b/ext/win32/lib/win32/registry.rb
index 16a08310ad..4fed03f6a9 100644
--- a/ext/win32/lib/win32/registry.rb
+++ b/ext/win32/lib/win32/registry.rb
@@ -318,7 +318,7 @@ For detail, see the MSDN[http://msdn.microsoft.com/library/en-us/sysinfo/base/pr
size = packdw(0)
name = make_wstr(name)
check RegQueryValueExW.call(hkey, name, 0, type, 0, size)
- data = "\0".force_encoding('ASCII-8BIT') * unpackdw(size)
+ data = "\0".b * unpackdw(size)
check RegQueryValueExW.call(hkey, name, 0, type, data, size)
[ unpackdw(type), data[0, unpackdw(size)] ]
end