lib/ipaddress/extensions/extensions.rb in ipaddress-0.6.0 vs lib/ipaddress/extensions/extensions.rb in ipaddress-0.7.0

- old
+ new

@@ -1,15 +1,15 @@ -class << Math +class << Math # :nodoc: def log2(n); log(n) / log(2); end end if RUBY_VERSION =~ /1\.8/ - class Hash + class Hash # :nodoc: alias :key :index end end -class Integer +class Integer # :nodoc: def power_of_2? Math::log2(self).to_i == Math::log2(self) end def closest_power_of_2(limit=32)