lib/fuzzy_match.rb in fuzzy_match-2.0.2 vs lib/fuzzy_match.rb in fuzzy_match-2.0.3
- old
+ new
@@ -134,10 +134,15 @@
last_result.identities = identities
last_result.groupings = groupings
last_result.stop_words = stop_words
end
- needle = Record.new needle
+ needle = case needle
+ when String
+ Record.new needle
+ else
+ Record.new needle, read: read
+ end
if gather_last_result
last_result.needle = needle
end