diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2017-06-20 08:56:37 -0700 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2017-06-20 08:56:37 -0700 |
commit | afc542a82936ef09f6912965773bb641d316f355 (patch) | |
tree | 94665a4fe797c73e413e74dd19ad4d597b45f54b /lib/chef/provider/group | |
parent | 14f693ba740decd876e67dbcb9f5d525ebbfdd8a (diff) | |
download | chef-afc542a82936ef09f6912965773bb641d316f355.tar.gz |
fixes for rubocop 0.49.1 engine
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
Diffstat (limited to 'lib/chef/provider/group')
-rw-r--r-- | lib/chef/provider/group/aix.rb | 2 | ||||
-rw-r--r-- | lib/chef/provider/group/groupadd.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/chef/provider/group/aix.rb b/lib/chef/provider/group/aix.rb index 2db6dc32a7..405e43cff2 100644 --- a/lib/chef/provider/group/aix.rb +++ b/lib/chef/provider/group/aix.rb @@ -63,7 +63,7 @@ class Chef def set_options opts = [] - { gid: "id" }.sort { |a, b| a[0] <=> b[0] }.each do |field, option| + { gid: "id" }.sort_by { |a| a[0] }.each do |field, option| next unless current_resource.send(field) != new_resource.send(field) if new_resource.send(field) Chef::Log.debug("#{new_resource} setting #{field} to #{new_resource.send(field)}") diff --git a/lib/chef/provider/group/groupadd.rb b/lib/chef/provider/group/groupadd.rb index f73c3b3be9..7826078e55 100644 --- a/lib/chef/provider/group/groupadd.rb +++ b/lib/chef/provider/group/groupadd.rb @@ -108,7 +108,7 @@ class Chef # <string>:: A string containing the option and then the quoted value def set_options opts = [] - { gid: "-g" }.sort { |a, b| a[0] <=> b[0] }.each do |field, option| + { gid: "-g" }.sort_by { |a| a[0] }.each do |field, option| next unless current_resource.send(field) != new_resource.send(field) next unless new_resource.send(field) opts << option |