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
|
begin
|
||||||
type, data = read(subkey)
|
type, data = read(subkey)
|
||||||
rescue Error
|
rescue Error
|
||||||
next
|
else
|
||||||
end
|
|
||||||
yield subkey, type, data
|
yield subkey, type, data
|
||||||
|
end
|
||||||
index += 1
|
index += 1
|
||||||
end
|
end
|
||||||
index
|
index
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue