From 94bd31a85722d39e38dbb7deb5031dd7ce11ab87 Mon Sep 17 00:00:00 2001 From: Jonah Roth Date: Fri, 27 May 2016 10:16:42 -0400 Subject: [PATCH] Passes all tests --- parser.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/parser.rb b/parser.rb index adaad3e..9f0f4a8 100644 --- a/parser.rb +++ b/parser.rb @@ -1,3 +1,7 @@ def word_in_string?(word, string) - # implement with your code here + if (/(\A|\s|_|-)#{word}(\z|\s|_|-)/ =~ string).nil? + :no + else + :yes + end end