Details
Description
The read method of Win32::Registry class actually returns a [type, data] array if the value exists, but it's used as if it returns just the data in methods like package_installer?, pending_computer_rename?.
In most cases, there is no problem with it because the detecting result is determined by whether the registry value exists or not, not by the data. But it's probably cause trouble sometimes. Unit tests didn't catch this since the return value is mocked as data, not [type, data]...
def reg_value(path, value) |
rval = nil |
|
with_key(path) do |reg| |
rval = reg.read(value)
|
end |
|
rval
|
end |
The same problem in pending_rename_operations?.
Attachments
Issue Links
- relates to
-
MODULES-2852 Reboot - Create Acceptance Test for "pending_file_rename_operations?" Scenario
-
- Accepted
-
- links to