mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
Regexp.union seems to have different results in 1.8
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user