From 933387e7391e66f08ffdea228fc1b791e89ffa25 Mon Sep 17 00:00:00 2001 From: Aaron Lippold Date: Wed, 10 Oct 2018 09:20:33 -0400 Subject: [PATCH] Fixes #3480 (#3483) * updates the AlpinePkg class `info` method to use the `delete_if` method as the `reject!` method was returning nil. Signed-off-by: Aaron Lippold --- lib/resources/package.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/resources/package.rb b/lib/resources/package.rb index 64c16b572..24490e641 100644 --- a/lib/resources/package.rb +++ b/lib/resources/package.rb @@ -258,7 +258,7 @@ module Inspec::Resources cmd = inspec.command("apk info -vv --no-network | grep #{package_name}") return {} if cmd.exit_status.to_i != 0 - pkg_info = cmd.stdout.split("\n").reject! { |e| e =~ /^WARNING/i } + pkg_info = cmd.stdout.split("\n").delete_if { |e| e =~ /^WARNING/i } pkg = pkg_info[0].split(' - ')[0] {