diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2006-10-11 00:29:59 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2006-10-11 00:29:59 +0000 |
commit | 111738737674121343fb1aba2f7883e682d205c1 (patch) | |
tree | 7ad55c5588cb1453e4b335afe492a8087cd1b8ff | |
parent | 629b8af2b0e143b18aa4206beb6006b9f9898788 (diff) | |
download | rails-111738737674121343fb1aba2f7883e682d205c1.tar.gz rails-111738737674121343fb1aba2f7883e682d205c1.tar.bz2 rails-111738737674121343fb1aba2f7883e682d205c1.zip |
Compare to 0 rather than call zero? to handle nil.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5282 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
-rwxr-xr-x | activerecord/lib/active_record/fixtures.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/fixtures.rb b/activerecord/lib/active_record/fixtures.rb index 6882a44b71..ae00db4e6d 100755 --- a/activerecord/lib/active_record/fixtures.rb +++ b/activerecord/lib/active_record/fixtures.rb @@ -543,7 +543,7 @@ module Test #:nodoc: return unless defined?(ActiveRecord::Base) && !ActiveRecord::Base.configurations.blank? # Rollback changes if a transaction is active. - if use_transactional_fixtures? && !Thread.current['open_transactions'].zero? + if use_transactional_fixtures? && Thread.current['open_transactions'] != 0 ActiveRecord::Base.connection.rollback_db_transaction Thread.current['open_transactions'] = 0 end |