diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2015-02-18 16:30:42 -0800 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2015-02-18 16:30:42 -0800 |
commit | b157f7895c73d97423799f6144396bc9840b187c (patch) | |
tree | d3ec2199185048f2d711114c98c0fc53755a7b8c /lib | |
parent | 91c87f8249b4ebc136de64ae453e371d678c884e (diff) | |
download | chef-b157f7895c73d97423799f6144396bc9840b187c.tar.gz |
fix Lint/BlockAlignmentlcg/unreachable-code
Diffstat (limited to 'lib')
-rw-r--r-- | lib/chef/provider/env.rb | 4 | ||||
-rw-r--r-- | lib/chef/util/windows/net_use.rb | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/lib/chef/provider/env.rb b/lib/chef/provider/env.rb index 970131c407..815a19bc0c 100644 --- a/lib/chef/provider/env.rb +++ b/lib/chef/provider/env.rb @@ -102,9 +102,9 @@ class Chef return true #do not delete the key else new_value = - current_values.select { |item| + current_values.select do |item| not new_values.include?(item) - }.join(@new_resource.delim) + end.join(@new_resource.delim) if new_value.empty? return false #nothing left here, delete the key diff --git a/lib/chef/util/windows/net_use.rb b/lib/chef/util/windows/net_use.rb index 37efc02fcc..62d7e169dc 100644 --- a/lib/chef/util/windows/net_use.rb +++ b/lib/chef/util/windows/net_use.rb @@ -46,9 +46,9 @@ class Chef::Util::Windows::NetUse < Chef::Util::Windows USE_INFO_2.collect { |field| field[1].class == Fixnum ? 'i' : 'L' }.join SIZEOF_USE_INFO_2 = #sizeof(USE_INFO_2) - USE_INFO_2.inject(0){|sum,item| - sum + (item[1].class == Fixnum ? 4 : PTR_SIZE) - } + USE_INFO_2.inject(0) do |sum, item| + sum + (item[1].class == Fixnum ? 4 : PTR_SIZE) + end def use_info_2(args) USE_INFO_2.collect { |field| |