summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
Diffstat (limited to 'ext')
-rw-r--r--ext/win32/lib/win32/resolv.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/ext/win32/lib/win32/resolv.rb b/ext/win32/lib/win32/resolv.rb
index 647f144..340a9b9 100644
--- a/ext/win32/lib/win32/resolv.rb
+++ b/ext/win32/lib/win32/resolv.rb
@@ -60,6 +60,21 @@ module Win32
# Windows NT
#====================================================================
module Resolv
+ module SZ
+ refine Registry do
+ # ad hoc workaround for broken registry
+ def read_s(key)
+ type, str = read(key)
+ unless type == Registry::REG_SZ
+ warn "Broken registry, #{name}\\#{key} was #{Registry.type2name(type)}, ignored"
+ return String.new
+ end
+ str
+ end
+ end
+ end
+ using SZ
+
TCPIP_NT = 'SYSTEM\CurrentControlSet\Services\Tcpip\Parameters'
class << self