bluemonk/ipaddress — pull request #44 by mikerodrigues (2014-07-02 02:32:47+00:00)
Title: Fix first last

Hi,

I am attempting to fix https://github.com/bluemonk/ipaddress/issues/36

I added tests and they pass except for one. In the case of a /32 address, there is no broadcast address as far as I can find. There's no RFC about it that I could find, but it wouldn't make sense to have one for a single-address network. The code returns nil as it stands, and the tests expect valid IPAddress objects to be returned. I'm not sure if you'd rather it just return the limited broadcast address like /31 or something else.

I'm willing to make changes if you're not willing to merge the code as-is. If you're not concerned with /31 and /32 support that's cool too, but addresses do default to /32 if nothing is specified.

Thanks,
Michael