]> git.openstreetmap.org Git - rails.git/blobdiff - lib/short_link.rb
Merge remote-tracking branch 'upstream/pull/5422'
[rails.git] / lib / short_link.rb
index 424e85c1095999e781147f35610193b36ade59e0..8983f3bd3bd1c4858d5aab8caa57a538d12b32a7 100644 (file)
@@ -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