mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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.
This commit is contained in:
parent
09a2189c1b
commit
2bc09665ab
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue