diff --git a/lib/ipaddress/prefix.rb b/lib/ipaddress/prefix.rb index f3d585d..a0e3bb0 100644 --- a/lib/ipaddress/prefix.rb +++ b/lib/ipaddress/prefix.rb @@ -214,8 +214,8 @@ class Prefix128 < Prefix # #=> 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