From: YANAGAWA Kazuhisa Date: 2004-05-07T20:45:25+09:00 Subject: Re: ruby replacement for net::patricia needed In Message-Id: jm writes: > 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 > > Is there anything similar already in existence for ruby? Is it > possible to adapt the acl modules? I don't know whether patricia trie itself is essential or not, but ipaddr.rb, bundled with the current Ruby distribution, may help you. require "ipaddr" net = IPAddr.new("127.0.0.0/8") net.include?(IPAddr.new("127.0.0.1")) #=> true -- kjana@dm4lab.to May 7, 2004 A man is known by the company he keeps.