From: Tom Hughes Date: Tue, 2 Mar 2021 08:24:15 +0000 (+0000) Subject: Fix new rubocop warnings X-Git-Tag: live~2251 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/ff3a30d2458cc11ce058343fc6e55b894dc33d9c Fix new rubocop warnings --- diff --git a/app/controllers/api/changesets_controller.rb b/app/controllers/api/changesets_controller.rb index 29a57570d..34627a118 100644 --- a/app/controllers/api/changesets_controller.rb +++ b/app/controllers/api/changesets_controller.rb @@ -308,7 +308,7 @@ module Api # low, second is high - same as with bounding boxes. # check that we actually have 2 elements in the array - times = time.split(/,/) + times = time.split(",") raise OSM::APIBadUserInput, "bad time range" if times.size != 2 from, to = times.collect { |t| Time.parse(t) } diff --git a/lib/bounding_box.rb b/lib/bounding_box.rb index 44375ae5b..3b366dc1e 100644 --- a/lib/bounding_box.rb +++ b/lib/bounding_box.rb @@ -14,7 +14,7 @@ class BoundingBox end def self.from_s(s) - BoundingBox.new(*s.split(/,/)) if s.count(",") == 3 + BoundingBox.new(*s.split(",")) if s.count(",") == 3 end def self.from_bbox_params(params)