lib/ohai/plugins/shells.rb in ohai-16.5.6 vs lib/ohai/plugins/shells.rb in ohai-16.6.5

- old
+ new

@@ -18,12 +18,12 @@ Ohai.plugin(:Shells) do provides "shells" collect_data do - if ::File.exist?("/etc/shells") + if file_exist?("/etc/shells") shells [] - ::File.readlines("/etc/shells").each do |line| + file_open("/etc/shells").readlines.each do |line| # remove carriage returns and skip over comments / empty lines shells << line.chomp if line[0] == "/" end end end