aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2007-10-02 05:32:14 +0000
committerJeremy Kemper <jeremy@bitsweat.net>2007-10-02 05:32:14 +0000
commit0ee1cb2cd32bfaf47deaf5440dd5b9cf0915ab6a (patch)
tree5778378eafcbdfa37c82c67be1566c76aca249be /activerecord
parent9264bdc8f618344307f07790a07a60dc04b80434 (diff)
downloadrails-0ee1cb2cd32bfaf47deaf5440dd5b9cf0915ab6a.tar.gz
rails-0ee1cb2cd32bfaf47deaf5440dd5b9cf0915ab6a.tar.bz2
rails-0ee1cb2cd32bfaf47deaf5440dd5b9cf0915ab6a.zip
Ruby 1.9 compat, consistent load paths
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7719 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord')
-rwxr-xr-xactiverecord/test/abstract_unit.rb5
1 files changed, 2 insertions, 3 deletions
diff --git a/activerecord/test/abstract_unit.rb b/activerecord/test/abstract_unit.rb
index 1317f8dae3..d0924f3787 100755
--- a/activerecord/test/abstract_unit.rb
+++ b/activerecord/test/abstract_unit.rb
@@ -60,9 +60,8 @@ rescue LoadError
$stderr.puts "Skipping #{test_name} tests. `gem install mocha` and try again."
end
-ActiveRecord::Base.connection.class.class_eval do
-
- if not (const_get('IGNORED_SQL') rescue nil)
+ActiveRecord::Base.connection.class.class_eval do
+ unless defined? IGNORED_SQL
IGNORED_SQL = [/^PRAGMA/, /^SELECT currval/, /^SELECT CAST/, /^SELECT @@IDENTITY/]
def execute_with_counting(sql, name = nil, &block)