diff options
author | Eric Wong <normalperson@yhbt.net> | 2010-09-02 14:27:54 -0700 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2010-09-02 14:27:54 -0700 |
commit | 33eb621b54552e5398752976f07ef9494a610841 (patch) | |
tree | ce869a8c13a9dd2274f159d499bd05b15653109e /ext/rpatricia/rpatricia.c | |
parent | b758b29f5842d60933d98c1c292f00f73fedf24b (diff) | |
download | rpatricia-33eb621b54552e5398752976f07ef9494a610841.tar.gz |
sync docs with remove,match_best,match_exact behavior
match_best and match_exact will both return nil instead of false on failures, matching the documentation. remove documentation is updated to match the code, which returns true or false, never nil.
Diffstat (limited to 'ext/rpatricia/rpatricia.c')
-rw-r--r-- | ext/rpatricia/rpatricia.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/rpatricia/rpatricia.c b/ext/rpatricia/rpatricia.c index 2c3fcc9..38246e1 100644 --- a/ext/rpatricia/rpatricia.c +++ b/ext/rpatricia/rpatricia.c @@ -114,7 +114,7 @@ p_match (VALUE self, VALUE r_key) node = patricia_search_best(tree, prefix); Deref_Prefix (prefix); - return node ? wrap_node(node) : Qfalse; + return node ? wrap_node(node) : Qnil; } static VALUE @@ -144,7 +144,7 @@ p_match_exact (VALUE self, VALUE r_key) node = patricia_search_exact(tree, prefix); Deref_Prefix (prefix); - return node ? wrap_node(node) : Qfalse; + return node ? wrap_node(node) : Qnil; } static VALUE |