We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
a Class B network, like "10.13.0.0/16" contains 256 Class C networks [1]. consider the example code:
require 'ipaddress' x = IPAddress('10.13.0.0/16') c_class_count = (x.hosts.length / 256) + 1 x.split(c_class_count)
this results in the following error:
ArgumentError: New prefix must be between 16 and 32 from PATH/vendor/cache/ruby/1.9.1/gems/ipaddress-0.8.0/lib/ipaddress/ipv4.rb:684:in `subnet'
I also used "10.0.0.0/8" and reproduced the same behavior.
[1] http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing#IPv4_CIDR_blocks
The text was updated successfully, but these errors were encountered:
Thanks for filing up this bug. Looks quite strange. I'll dig into it.
Sorry, something went wrong.
added #to range and fixed ipaddress-gem#40
6bf73cf
fixed issue ipaddress-gem#40, and added IPv4#to() range method
72260e9
This has been included here - #61
mikemackintosh
Successfully merging a pull request may close this issue.
a Class B network, like "10.13.0.0/16" contains 256 Class C networks [1]. consider the example code:
this results in the following error:
I also used "10.0.0.0/8" and reproduced the same behavior.
[1] http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing#IPv4_CIDR_blocks
The text was updated successfully, but these errors were encountered: