You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Looking at the code I believe this is happening at https://github.com/ruby/ipaddr/blob/master/lib/ipaddr.rb#L649-L651, which is a very old commit, so this behavior is clearly expected. For my use case I need the host bits unmasked, so I want to parse 1.2.3.4/16 and be able to read back something like ip.address as 1.2.3.4 and the netmask as 255.255.0.0. It looks like that's not currently possible with this gem, which surprises me. Am I overlooking a method, or is there a nuance in the CIDR spec implemented here I've forgotten?
The text was updated successfully, but these errors were encountered:
This behavior caught me by surprise:
Looking at the code I believe this is happening at https://github.com/ruby/ipaddr/blob/master/lib/ipaddr.rb#L649-L651, which is a very old commit, so this behavior is clearly expected. For my use case I need the host bits unmasked, so I want to parse
1.2.3.4/16
and be able to read back something likeip.address
as1.2.3.4
and the netmask as255.255.0.0
. It looks like that's not currently possible with this gem, which surprises me. Am I overlooking a method, or is there a nuance in the CIDR spec implemented here I've forgotten?The text was updated successfully, but these errors were encountered: