Skip to content
Browse files

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

This reverts commit d80e4ee.

No need to care about 1.8 anymore, so reverting :)
  • Loading branch information...
1 parent 8c2e7bc commit a6a26702439ce5a73d5391a73d135c1b4d921663 @carlosantoniodasilva carlosantoniodasilva committed
Showing with 3 additions and 3 deletions.
  1. +3 −3 activerecord/test/cases/helper.rb
View
6 activerecord/test/cases/helper.rb
@@ -72,8 +72,8 @@ class SQLCounter
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 @@ def call(name, start, finish, message_id, values)
# 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

0 comments on commit a6a2670

Please sign in to comment.
Something went wrong with that request. Please try again.