Skip to content
This repository
Browse code

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
  • Loading branch information...
commit 111738737674121343fb1aba2f7883e682d205c1 1 parent 629b8af
Jeremy Kemper authored October 11, 2006
2  activerecord/lib/active_record/fixtures.rb
@@ -543,7 +543,7 @@ def teardown_with_fixtures
543 543
         return unless defined?(ActiveRecord::Base) && !ActiveRecord::Base.configurations.blank?
544 544
 
545 545
         # Rollback changes if a transaction is active.
546  
-        if use_transactional_fixtures? && !Thread.current['open_transactions'].zero?
  546
+        if use_transactional_fixtures? && Thread.current['open_transactions'] != 0
547 547
           ActiveRecord::Base.connection.rollback_db_transaction
548 548
           Thread.current['open_transactions'] = 0
549 549
         end

0 notes on commit 1117387

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