X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/7917a7db800eec3b35a71ceb74404dde1518a9dc..e37c877da51947cb24af4d046fd71a597bf24ba9:/app/controllers/geocoder_controller.rb diff --git a/app/controllers/geocoder_controller.rb b/app/controllers/geocoder_controller.rb index 02ebc8a1b..43f276efa 100644 --- a/app/controllers/geocoder_controller.rb +++ b/app/controllers/geocoder_controller.rb @@ -229,12 +229,12 @@ class GeocoderController < ApplicationController end def to_decdeg(captures) - ns = captures.fetch("ns").casecmp("s").zero? ? -1 : 1 + ns = captures.fetch("ns").casecmp?("s") ? -1 : 1 nsd = BigDecimal(captures.fetch("nsd", "0")) nsm = BigDecimal(captures.fetch("nsm", "0")) nss = BigDecimal(captures.fetch("nss", "0")) - ew = captures.fetch("ew").casecmp("w").zero? ? -1 : 1 + ew = captures.fetch("ew").casecmp?("w") ? -1 : 1 ewd = BigDecimal(captures.fetch("ewd", "0")) ewm = BigDecimal(captures.fetch("ewm", "0")) ews = BigDecimal(captures.fetch("ews", "0"))