Skip to content

@phene /gist:b9feaa46b078f784ee1f secret
Created

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
+++ 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
Something went wrong with that request. Please try again.