diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2007-10-02 05:32:14 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2007-10-02 05:32:14 +0000 |
commit | 0ee1cb2cd32bfaf47deaf5440dd5b9cf0915ab6a (patch) | |
tree | 5778378eafcbdfa37c82c67be1566c76aca249be /activerecord | |
parent | 9264bdc8f618344307f07790a07a60dc04b80434 (diff) | |
download | rails-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-x | activerecord/test/abstract_unit.rb | 5 |
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) |