summaryrefslogtreecommitdiff
path: root/ext/win32/lib
diff options
context:
space:
mode:
authorSam Aaron <[email protected]>2024-04-26 16:10:42 +0100
committer<[email protected]>2024-04-26 15:10:42 +0000
commit67b79d484f97033d362305607f0031ef7fa39f12 ()
treeb3ae6a507a9177c9afe6d80d0af4c1fc1070ee3d /ext/win32/lib
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
@@ -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)
check RegQueryValueExW.call(hkey, name, 0, type, data, size)
[ unpackdw(type), data[0, unpackdw(size)] ]
end