Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

logic error?

  • Loading branch information...
commit 095fdbc580b5f32df6ce66f60e5ac17b66e6561c 1 parent 7972445
@seamusabshere seamusabshere authored
Showing with 11 additions and 3 deletions.
  1. +11 −3 lib/loose_tight_dictionary.rb
View
14 lib/loose_tight_dictionary.rb
@@ -115,10 +115,18 @@ def find(needle, options = {})
[ candidates.dup, [] ]
end
- # special case: the needle didn't fit anywhere, but must_match_blocking is false, so we'll try it against everything
if joint.none?
- joint = disjoint
- disjoint = []
+ if must_match_blocking
+ if is_find_all
+ return []
+ else
+ return nil
+ end
+ else
+ # special case: the needle didn't fit anywhere, but must_match_blocking is false, so we'll try it against everything
+ joint = disjoint
+ disjoint = []
+ end
end
if gather_last_result
Please sign in to comment.
Something went wrong with that request. Please try again.