Skip to content
Snippets Groups Projects
Commit d28c3095 authored by kaustubh-d's avatar kaustubh-d
Browse files

Modified IPAddress::Prefix128 to allow /0 subnets

parent e781b98d
Branches
Tags
No related merge requests found
...@@ -214,8 +214,8 @@ module IPAddress ...@@ -214,8 +214,8 @@ module IPAddress
# #=> 64 # #=> 64
# #
def initialize(num=128) def initialize(num=128)
unless (1..128).include? num.to_i unless (0..128).include? num.to_i
raise ArgumentError, "Prefix must be in range 1..128, got: #{num}" raise ArgumentError, "Prefix must be in range 0..128, got: #{num}"
end end
super(num.to_i) super(num.to_i)
end end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment