Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
+++ 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?
+{|e| e =~ a_regexp_or_string}.any?
when String
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment