From 83710cc9ebf181cfc572bfdbe64436c17187b30a Mon Sep 17 00:00:00 2001 From: Anton Khorev Date: Mon, 7 Jul 2025 04:37:38 +0300 Subject: [PATCH] Shorten tags to hash conversion --- test/controllers/api/relations_controller_test.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/controllers/api/relations_controller_test.rb b/test/controllers/api/relations_controller_test.rb index b6610df6e..899def60d 100644 --- a/test/controllers/api/relations_controller_test.rb +++ b/test/controllers/api/relations_controller_test.rb @@ -1146,8 +1146,8 @@ module Api ## # returns a k->v hash of tags from an xml doc def get_tags_as_hash(a) - a.find("//osm/relation/tag").each_with_object({}) do |v, h| - h[v["k"]] = v["v"] + a.find("//osm/relation/tag").to_h do |tag| + [tag["k"], tag["v"]] end end -- 2.39.5