Permalink
Browse files

Use hash.reject! instead of hash.keep_if for backwards compatibility …

…to Ruby 1.8.7
  • Loading branch information...
1 parent f988f4c commit aaddff8d58227f053317055a40065c53e7e6502c @AaronH committed Apr 16, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/profanity_filter.rb
View
@@ -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

0 comments on commit aaddff8

Please sign in to comment.