lib/ipaddress/prefix.rb in ipaddress-0.8.0 vs lib/ipaddress/prefix.rb in ipaddress-0.8.2

- old
+ new

@@ -212,11 +212,11 @@ # # prefix = IPAddress::Prefix128.new 64 # #=> 64 # def initialize(num=128) - unless (1..128).include? num.to_i - raise ArgumentError, "Prefix must be in range 1..128, got: #{num}" + unless (0..128).include? num.to_i + raise ArgumentError, "Prefix must be in range 0..128, got: #{num}" end super(num.to_i) end #