Class: Fixnum

Inherits:
Object
  • Object
show all
Defined in:
lib/core_ext/math.rb

Instance Method Summary collapse

Instance Method Details

#pot?Boolean

Returns:

  • (Boolean)


2
3
4
# File 'lib/core_ext/math.rb', line 2

def pot?
  (self & (self - 1)) == 0
end