about summary refs log tree commit
diff options
context:
space:
mode:
-rw-r--r--README2
-rw-r--r--ext/rpatricia/rpatricia.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/README b/README
index 029599a..3b39e23 100644
--- a/README
+++ b/README
@@ -139,7 +139,7 @@ remove:
     and mask specified from the Patricia Trie.
 
     If the matching node is found in the Patricia Trie, it is removed,
-    and this method returns the true. This method returns nil on
+    and this method returns the true. This method returns false on
     failure.
 
 remove_node:         An alias of remove
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