You might also be interested in the PostgreSQL 'ip4r' data type, which allows fast indexes on range inclusion, overlaps, and the like. It works well.
-- Steve Huwig
> -----Original Message-----
> From: Code for Libraries [mailto:[log in to unmask]] On Behalf Of
> Jonathan Rochkind
> Sent: Thursday, November 08, 2012 3:29 PM
> To: [log in to unmask]
> Subject: [CODE4LIB] ruby gem for testing IP addresses for inclusion in
> sets of non-contiguous address ranges
> Something we university library folks often need to do, even though
> kind of a ridiculous design.
> I wrote a ruby convenience gem for it that some may find useful,
> basically just a convenience method around the ruby IPAddr stdlib,
> does the heavy lifting.