X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/9a9b045372a6f48420a9a6dacfde52c34ab7abce..c7061991e74a20cc0576a3afa269821a87178f77:/lib/potlatch.rb?ds=inline diff --git a/lib/potlatch.rb b/lib/potlatch.rb index a077d4c4d..6e8c88bb8 100644 --- a/lib/potlatch.rb +++ b/lib/potlatch.rb @@ -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