X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/935838c4747aac13b9c626c8728b5bf1fd4d6e4d..2d43acf0477a2dbf2efaed7480d0d73454d8196e:/cookbooks/chef/libraries/compare_versions.rb diff --git a/cookbooks/chef/libraries/compare_versions.rb b/cookbooks/chef/libraries/compare_versions.rb index d2ccf8a08..cf6ab1ea2 100644 --- a/cookbooks/chef/libraries/compare_versions.rb +++ b/cookbooks/chef/libraries/compare_versions.rb @@ -1,12 +1,12 @@ class Chef class Util def self.compare_versions(a, b) - if a.kind_of?(String) - a = a.split(".").map { |c| c.to_i } + if a.is_a?(String) + a = a.split(".").map(&:to_i) end - if b.kind_of?(String) - b = b.split(".").map { |c| c.to_i } + if b.is_a?(String) + b = b.split(".").map(&:to_i) end a <=> b