Skip to content
Snippets Groups Projects
Commit dae93ad0 authored by Marco Ceresa's avatar Marco Ceresa
Browse files

Merge pull request #48 from ClogenyTechnologies/ipv6-prefix

Modified IPAddress::Prefix128 to allow /0 subnets
parents 65c5436a d28c3095
No related branches found
No related tags found
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