-
-
Save phene/b9feaa46b078f784ee1f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
+++ a/have_sent_email.rb | |
--- b/have_sent_email.rb | |
@@ -98,7 +98,7 @@ module Shoulda # :nodoc: | |
def regexp_or_string_match_in_array(an_array, a_regexp_or_string) | |
case a_regexp_or_string | |
when Regexp | |
- an_array.detect{|e| e =~ a_regexp_or_string}.any? | |
+ an_array.select{|e| e =~ a_regexp_or_string}.any? | |
when String | |
an_array.include?(a_regexp_or_string) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment