Skip to content

Commit

Permalink
Merge pull request rails#9711 from vipulnsward/moar_cleanups
Browse files Browse the repository at this point in the history
MOAR cleanups of unused variables.
  • Loading branch information
steveklabnik committed Mar 14, 2013
2 parents a3c8e4a + d338a0f commit 36f7732
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
6 changes: 3 additions & 3 deletions activerecord/lib/active_record/railtie.rb
Expand Up @@ -49,7 +49,7 @@ class Railtie < Rails::Railtie # :nodoc:
Rails.logger.extend ActiveSupport::Logger.broadcast console
end

runner do |app|
runner do
require "active_record/base"
end

Expand All @@ -64,7 +64,7 @@ class Railtie < Rails::Railtie # :nodoc:
ActiveSupport.on_load(:active_record) { self.logger ||= ::Rails.logger }
end

initializer "active_record.migration_error" do |app|
initializer "active_record.migration_error" do
if config.active_record.delete(:migration_error) == :page_load
config.app_middleware.insert_after "::ActionDispatch::Callbacks",
"ActiveRecord::Migration::CheckPending"
Expand Down Expand Up @@ -158,7 +158,7 @@ class Railtie < Rails::Railtie # :nodoc:
end

# Expose database runtime to controller for logging.
initializer "active_record.log_runtime" do |app|
initializer "active_record.log_runtime" do
require "active_record/railties/controller_runtime"
ActiveSupport.on_load(:action_controller) do
include ActiveRecord::Railties::ControllerRuntime
Expand Down
Expand Up @@ -84,7 +84,6 @@ def test_activerecord_model
assert_nothing_raised { x.save }
assert_nothing_raised { Group.find_by_order('y') }
assert_nothing_raised { Group.find(1) }
x = Group.find(1)
end

# has_one association with reserved-word table name
Expand Down
2 changes: 1 addition & 1 deletion activerecord/test/cases/associations_test.rb
Expand Up @@ -95,7 +95,7 @@ def test_should_construct_new_finder_sql_after_create
def test_force_reload
firm = Firm.new("name" => "A New Firm, Inc")
firm.save
firm.clients.each {|c|} # forcing to load all clients
firm.clients.each {} # forcing to load all clients
assert firm.clients.empty?, "New firm shouldn't have client objects"
assert_equal 0, firm.clients.size, "New firm should have 0 clients"

Expand Down
2 changes: 1 addition & 1 deletion activerecord/test/cases/connection_pool_test.rb
Expand Up @@ -185,7 +185,7 @@ def test_checkout_behaviour
assert_not_nil connection
threads = []
4.times do |i|
threads << Thread.new(i) do |pool_count|
threads << Thread.new(i) do
connection = pool.connection
assert_not_nil connection
connection.close
Expand Down

0 comments on commit 36f7732

Please sign in to comment.