]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/chef/libraries/compare_versions.rb
Fix some rubocop detected style issues
[chef.git] / cookbooks / chef / libraries / compare_versions.rb
index d2ccf8a0836e48470f0653ef195e9d23fdb67fc1..2f5d60baff82b5f435397c50b1efdce8065c4060 100644 (file)
@@ -2,11 +2,11 @@ class Chef
   class Util
     def self.compare_versions(a, b)
       if a.kind_of?(String)
-        a = a.split(".").map { |c| c.to_i }
+        a = a.split(".").map(&:to_i)
       end
 
       if b.kind_of?(String)
-        b = b.split(".").map { |c| c.to_i }
+        b = b.split(".").map(&:to_i)
       end
 
       a <=> b