From: Hugh Sasse Staff Elec Eng Date: 2004-05-07T20:01:59+09:00 Subject: Re: ruby replacement for net::patricia needed On Fri, 7 May 2004, jm wrote: > I'm looking for the ruby equivalent of the perl Net::Patricia module > which uses the Patricia Trie algorithm for storing objects in > association with a ip address/mask combinations. For example, I'm not familiar with this package but.... > > p = Patricia.new() > p.add_address('127.0.0.0/8', obj) # stores object obj > o = p.match('127.0.0.1') # returns object obj > Tuplespaces may help, though you'll need to create some Netmask class with an === operator so it will compare the addresses against the mask (to do the matching) the way you want. This is part of Rinda which is part of ruby out of the box. [...] > Jeff. > Hugh