diff options
author | Tim Smith <tsmith@chef.io> | 2020-09-16 16:00:32 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-16 16:00:32 -0700 |
commit | e3179ff2c94e3ed59d5d3b78243dd564d4b127f7 (patch) | |
tree | c6455a618f451a4fb788be25f6830cdc2125e2bd /lib | |
parent | 1ce3174538126c8e3642bf005382f1ee396b5542 (diff) | |
download | chef-e3179ff2c94e3ed59d5d3b78243dd564d4b127f7.tar.gz |
Update lib/chef/mixin/versioned_api.rb
Signed-off-by: Tim Smith <tsmith@chef.io>
Co-authored-by: pete higgins <pete@peterhiggins.org>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/chef/mixin/versioned_api.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/chef/mixin/versioned_api.rb b/lib/chef/mixin/versioned_api.rb index 9333a39101..b627e0210c 100644 --- a/lib/chef/mixin/versioned_api.rb +++ b/lib/chef/mixin/versioned_api.rb @@ -50,7 +50,7 @@ class Chef # in which case we'll just start with the highest version and see what happens ServerAPIVersions.instance.min_server_version.nil? || (version >= ServerAPIVersions.instance.min_server_version && version <= ServerAPIVersions.instance.send(type)) end - .max { |a, b| a.send(:minimum_api_version) <=> b.send(:minimum_api_version) } + .max_by { |a| a.send(:minimum_api_version) } end def def_versioned_delegator(method) |