]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/api/changesets_controller.rb
Merge remote-tracking branch 'upstream/pull/3251'
[rails.git] / app / controllers / api / changesets_controller.rb
index a236083db2813f09bab39b03bd7b7eb0ba629172..34627a1187acca98b026da44c4c3ce5ecc0e0428 100644 (file)
@@ -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) }
@@ -319,9 +319,7 @@ module Api
       end
       # stupid Time seems to throw both of these for bad parsing, so
       # we have to catch both and ensure the correct code path is taken.
-    rescue ArgumentError => e
-      raise OSM::APIBadUserInput, e.message.to_s
-    rescue RuntimeError => e
+    rescue ArgumentError, RuntimeError => e
       raise OSM::APIBadUserInput, e.message.to_s
     end