Re: IP to Country (#139)

I changed to while low < high, and also the walking backwards failed
when reading the first line (btw, Steve, won’t your solution also fail
for that case?).

Yea it seems that mine will loop forever if you give an invalid ip
address that evalutes to less than 0. Changing to ‘low < high’ seems to
fix that. Also it incorrectly reports nil instead of no country on
0.0.0.0. This is all running on the stock csv file (with comments),
haven’t tried it at all on a modified file.

  • steve

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs