Forum: Ruby windows registry delete value oddity

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Brad T. (Guest)
on 2006-04-17 16:14
Say I have four registry values under the same key with these names:

1. 'this_text'
2. 'this_text1'
3. 'this_text2'
4. 'this_text3'

When I run the script below, two of the values will be deleted. When I
run it again, one value will be deleted. On the third run, the last
value will be deleted. I don't understand why all of the values are not
deleted on the first run.,
Win32::Registry::KEY_ALL_ACCESS) do |reg|

  reg.each_value do |name, type, data|

    if name.include?('this_text')





Could someone point out what I'm doing wrong?

This topic is locked and can not be replied to.