]> git.openstreetmap.org Git - rails.git/blobdiff - lib/potlatch.rb
Update bundle
[rails.git] / lib / potlatch.rb
index a077d4c4da65f18499f0af44d1f3e5709048e79f..6e8c88bb80e5d3c3a0f49a5a628586b4f0039d1d 100644 (file)
@@ -30,9 +30,7 @@ module Potlatch
 
     # Return numeric array
     def self.getarray(s)
-      getlong(s).times.collect do
-        getvalue(s)
-      end
+      Array.new(getlong(s)) { getvalue(s) }
     end
 
     # Return object/hash
@@ -251,11 +249,11 @@ module Potlatch
           tag = $1
           type = $2
           values = $3
-          if values == "-"
-            autotags[type][tag] = []
-          else
-            autotags[type][tag] = values.split(",").sort.reverse
-          end
+          autotags[type][tag] = if values == "-"
+                                  []
+                                else
+                                  values.split(",").sort.reverse
+                                end
         end
       end