diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2019-06-07 02:00:48 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2019-06-07 02:00:48 +0900 |
commit | 2bc09665ab8e72d4320a55a274eae903262f29cd (patch) | |
tree | 747c5470e2f635c41d48afbe8e2fcea8d7004d99 /ext | |
parent | 09a2189c1b5dd5a28a052f9464a516213f89d6e7 (diff) | |
download | ruby-2bc09665ab8e72d4320a55a274eae903262f29cd.tar.gz |
win32/registry.rb: fix potential infinite loop
* ext/win32/lib/win32/registry.rb (Win32::Registry#each_value):
advance the index even if an error occurred in #read.
Diffstat (limited to 'ext')
-rw-r--r-- | ext/win32/lib/win32/registry.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/win32/lib/win32/registry.rb b/ext/win32/lib/win32/registry.rb index ea04bb34bf..451499b166 100644 --- a/ext/win32/lib/win32/registry.rb +++ b/ext/win32/lib/win32/registry.rb @@ -575,9 +575,9 @@ For detail, see the MSDN[http://msdn.microsoft.com/library/en-us/sysinfo/base/pr begin type, data = read(subkey) rescue Error - next + else + yield subkey, type, data end - yield subkey, type, data index += 1 end index |