diff options
author | codeout <goodies@codeout.net> | 2012-10-03 20:57:13 +0900 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2012-10-04 03:20:43 -0700 |
commit | 523c6a46b06a726d63aa7a27840b79586f356bb5 (patch) | |
tree | e1db845c24704b15dda6c4706f58b13744ecc77d /test.rb | |
parent | a5be0f72618bcb2c82ee5131f4899abb3d9db529 (diff) | |
download | rpatricia-523c6a46b06a726d63aa7a27840b79586f356bb5.tar.gz |
Added a method 'nodes' to return all nodes in ruby's Hash.
This is useful when a ruby code requires nodes list for example, and also it helps when we sort user data by prefix. [ew: minor compiler compatibility fixes]
Diffstat (limited to 'test.rb')
-rw-r--r-- | test.rb | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -60,4 +60,7 @@ my_test(4 == t.num_nodes) puts "test: showing all nodes" t.show_nodes +puts "test: return all nodes in Hash" +my_test(t.nodes == {"127.0.0.0/24"=>"", "192.168.1.0/24"=>"", "192.168.2.0/24"=>"", "192.168.3.100/32"=>""}) + t.destroy |