Navigation Menu

Skip to content

Commit

Permalink
Use hash.reject! instead of hash.keep_if for backwards compatibility …
Browse files Browse the repository at this point in the history
…to Ruby 1.8.7
  • Loading branch information
AaronH committed Apr 16, 2012
1 parent f988f4c commit aaddff8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/profanity_filter.rb
Expand Up @@ -82,8 +82,8 @@ def append_dictionary( file )
def remove_from_dictionary( file )
excluded_words = YAML.load_file( file )
if excluded_words
dictionary.keep_if do |dictionary_word|
!( excluded_words.include?(dictionary_word) )
dictionary.reject! do |dictionary_word|
excluded_words.include? dictionary_word
end
end
end
Expand Down

0 comments on commit aaddff8

Please sign in to comment.