]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/swf_controller.rb
Fix new rubocop warnings
[rails.git] / app / controllers / swf_controller.rb
index ceaf7e4c0d306f15d6f06ac17f9d94e027eb6087..9033a073328a4ae6f0014ea72681a06e3c867d8e 100644 (file)
@@ -195,7 +195,7 @@ class SwfController < ApplicationController
   # Find number of bits required to store arbitrary-length binary
 
   def length_sb(n)
-    Math.frexp(n + (n == 0 ? 1 : 0))[1] + 1
+    Math.frexp(n + (n.zero? ? 1 : 0))[1] + 1
   end
 
   # ====================================================================