From: Tom Hughes Date: Tue, 5 Nov 2024 18:22:02 +0000 (+0000) Subject: Fix new rubocop warnings X-Git-Tag: live~30 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/e15a92a30213d87e10e000a240a7dcab66c208b4 Fix new rubocop warnings --- diff --git a/lib/short_link.rb b/lib/short_link.rb index 424e85c10..8983f3bd3 100644 --- a/lib/short_link.rb +++ b/lib/short_link.rb @@ -32,11 +32,11 @@ module ShortLink else 3.times do x <<= 1 - x |= 1 unless (t & 32).zero? + x |= 1 unless t.nobits?(32) t <<= 1 y <<= 1 - y |= 1 unless (t & 32).zero? + y |= 1 unless t.nobits?(32) t <<= 1 end z += 3 diff --git a/test/controllers/api/relations_controller_test.rb b/test/controllers/api/relations_controller_test.rb index 6cbfe6045..5fb62d29f 100644 --- a/test/controllers/api/relations_controller_test.rb +++ b/test/controllers/api/relations_controller_test.rb @@ -1066,7 +1066,7 @@ module Api # create a new changeset for this operation, so we are assured # that the bounding box will be newly-generated. - changeset_id = with_controller(Api::ChangesetsController.new) do + with_controller(Api::ChangesetsController.new) do xml = "" put changeset_create_path, :params => xml, :headers => auth_header assert_response :forbidden, "shouldn't be able to create changeset for modify test, as should get forbidden"