From d80e4ee20e690dfc0f4ec31c41b873d607462872 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Thu, 8 Dec 2011 10:17:37 -0800 Subject: Regexp.union seems to have different results in 1.8 --- activerecord/test/cases/helper.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'activerecord') 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 -- cgit v1.2.3