aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/helper.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/test/cases/helper.rb')
-rw-r--r--activerecord/test/cases/helper.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/activerecord/test/cases/helper.rb b/activerecord/test/cases/helper.rb
index b750a03fba..ae2c230d15 100644
--- a/activerecord/test/cases/helper.rb
+++ b/activerecord/test/cases/helper.rb
@@ -70,8 +70,8 @@ module ActiveRecord
attr_reader :ignore
- def initialize(ignore = Regexp.union(self.class.ignored_sql))
- @ignore = ignore
+ def initialize(ignore = self.class.ignored_sql)
+ @ignore = ignore
end
def call(name, start, finish, message_id, values)
@@ -79,7 +79,7 @@ module ActiveRecord
# FIXME: this seems bad. we should probably have a better way to indicate
# the query was cached
- return if 'CACHE' == values[:name] || ignore =~ sql
+ return if 'CACHE' == values[:name] || ignore.any? { |x| x =~ sql }
self.class.log << sql
end
end