lib/facter/resolvers/aix/mountpoints.rb in facter-4.3.1 vs lib/facter/resolvers/aix/mountpoints.rb in facter-4.4.0
- old
+ new
@@ -17,11 +17,11 @@
def read_mount(fact_name)
@fact_list[:mountpoints] = {}
output = Facter::Core::Execution.execute('mount', logger: log)
output.split("\n").drop(2).map do |line|
- next if line =~ /procfs|ahafs/
+ next if /procfs|ahafs/.match?(line)
add_mount_points_fact(line)
end
retrieve_sizes_for_mounts
@@ -38,10 +38,10 @@
end
def retrieve_sizes_for_mounts
output = Facter::Core::Execution.execute('df -P', logger: log)
output.split("\n").drop(1).map do |line|
- next if line =~ /-\s+-\s+-/
+ next if /-\s+-\s+-/.match?(line)
mount_info = line.split("\s")
mount_info[3] = translate_to_bytes(mount_info[3])
mount_info[2] = translate_to_bytes(mount_info[2])
mount_info[1] = translate_to_bytes(mount_info[1])