Skip to content

Commit

Permalink
added checkCommon method
Browse files Browse the repository at this point in the history
  • Loading branch information
pkLazer committed Sep 8, 2013
1 parent 81f9607 commit f4ef1e4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pwrank.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,9 @@ def getString
def checkIfCommon
hasMatch = false
for word in $common
if /#{@string}/ =~ word
hasMatch = true
word = word.strip
if (/#{word}/ =~ @string) != nil
hasMatch = true # true if it finds a match in the list of common words
break
end
end
Expand Down

0 comments on commit f4ef1e4

Please sign in to comment.