Skip to content

Commit f172f29

Browse files
authored
Merge pull request #822 from jrafanie/ruby3
Fix deprecated and now removed URI.decode (ruby 3)
2 parents 6e2aeeb + babd626 commit f172f29

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/models/manageiq/providers/vmware/infra_manager/event_parser.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ def self.event_to_hash(event, ems_id = nil)
8484
vm_ems_ref = vm_data['vm']
8585
result[:vm_ems_ref] = vm_ems_ref.to_s unless vm_ems_ref.nil?
8686
vm_name = vm_data['name']
87-
result[:vm_name] = URI.decode(vm_name) unless vm_name.nil?
87+
result[:vm_name] = URI::DEFAULT_PARSER.unescape(vm_name) unless vm_name.nil?
8888
vm_location = vm_data['path']
8989
result[:vm_location] = vm_location unless vm_location.nil?
9090
vm_uid_ems = vm_data['uuid']
@@ -99,7 +99,7 @@ def self.event_to_hash(event, ems_id = nil)
9999
vm_ems_ref = vm_data['vm']
100100
result[:dest_vm_ems_ref] = vm_ems_ref.to_s unless vm_ems_ref.nil?
101101
vm_name = vm_data['name']
102-
result[:dest_vm_name] = URI.decode(vm_name) unless vm_name.nil?
102+
result[:dest_vm_name] = URI::DEFAULT_PARSER.unescape(vm_name) unless vm_name.nil?
103103
vm_location = vm_data['path']
104104
result[:dest_vm_location] = vm_location unless vm_location.nil?
105105
end

0 commit comments

Comments
 (0)