ipv4 abbreviation not supported #20

ghost opened this Issue May 13, 2012 · 1 comment


None yet

2 participants


IPAddress::valid_ipv4? '10.1'
=> false

$ ping 10.1
PING 10.1 ( 56 data bytes

to be honest, not that critical, but still for completenes...


I'm interested in implementing this, it seems to be a rather interesting topic: http://superuser.com/questions/486788/why-does-pinging-192-168-072-only-2-dots-return-a-response-from-192-168-0-58

[17] pry(main)> IPAddress.parse("192.168.072").to_s
ArgumentError: Invalid IP "192.168.072"

Should return ""

[2] pry(main)> IPAddress.parse("").to_s
=> ""

Should also return ""

At least that's how they're interpreted when testing with ping on linux.

I realize it's a different case than what ghost was talking about, but both would be nice towards the goal of completeness with regards to parsing.

@mikemackintosh mikemackintosh self-assigned this Mar 26, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment