X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/c9d35839befe92d916425baa4daec7dd77ade929..14f1777dadf26b52936edf0c9685f960f59564a3:/lib/potlatch.rb 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