style: pass &:to_i as an argument to collect instead of a block

This commit is contained in:
John Bampton
2022-12-26 19:09:04 +10:00
parent feb6164d8d
commit 10250f835c
+1 -1
View File
@@ -72,7 +72,7 @@ Set ANDROID_NDK_HOME environment variable or set :ndk_home parameter
next nil unless path[-1] == "*"
dirs = Dir.glob(path).collect do |d|
m = d.match(/(\d+)\.(\d+)\.(\d+)$/)
m ? [m[1], m[2], m[3]].collect { |v| v.to_i } : nil
m ? [m[1], m[2], m[3]].collect(&:to_i) : nil
end
dirs.compact!
dirs.sort! do |before, after|