1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Revert "Regexp.union seems to have different results in 1.8"

This reverts commit d80e4ee20e.

No need to care about 1.8 anymore, so reverting :)
This commit is contained in:
Carlos Antonio da Silva 2012-01-06 04:13:13 -02:00
parent 8c2e7bcfd5
commit a6a2670243

View file

@ -72,8 +72,8 @@ module ActiveRecord
attr_reader :ignore
def initialize(ignore = self.class.ignored_sql)
@ignore = ignore
def initialize(ignore = Regexp.union(self.class.ignored_sql))
@ignore = ignore
end
def call(name, start, finish, message_id, values)
@ -81,7 +81,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.any? { |x| x =~ sql }
return if 'CACHE' == values[:name] || ignore =~ sql
self.class.log << sql
end
end