From d29843b5bcdd7bc8b5eba741549a3e8b2c00607d Mon Sep 17 00:00:00 2001 From: Tim Smith Date: Thu, 22 Mar 2018 08:59:45 -0700 Subject: Fix the condition on the raise with unknown keys Signed-off-by: Tim Smith --- lib/chef/resource/sysctl.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/chef/resource/sysctl.rb b/lib/chef/resource/sysctl.rb index 29222b04d3..ed9013d7cc 100644 --- a/lib/chef/resource/sysctl.rb +++ b/lib/chef/resource/sysctl.rb @@ -65,7 +65,7 @@ class Chef def get_sysctl_value(key) o = shell_out("sysctl -n -e #{key}") - raise "Unknown sysctl key #{key}!" if o.error! + raise "Unknown sysctl key #{key}!" if o.error? o.stdout.to_s.tr("\t", " ").strip end -- cgit v1.2.1