Skip to content

Commit 36f7732

Browse files
committed
Merge pull request rails#9711 from vipulnsward/moar_cleanups
MOAR cleanups of unused variables.
2 parents a3c8e4a + d338a0f commit 36f7732

File tree

4 files changed

+5
-6
lines changed

4 files changed

+5
-6
lines changed

activerecord/lib/active_record/railtie.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ class Railtie < Rails::Railtie # :nodoc:
4949
Rails.logger.extend ActiveSupport::Logger.broadcast console
5050
end
5151

52-
runner do |app|
52+
runner do
5353
require "active_record/base"
5454
end
5555

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

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

160160
# Expose database runtime to controller for logging.
161-
initializer "active_record.log_runtime" do |app|
161+
initializer "active_record.log_runtime" do
162162
require "active_record/railties/controller_runtime"
163163
ActiveSupport.on_load(:action_controller) do
164164
include ActiveRecord::Railties::ControllerRuntime

activerecord/test/cases/adapters/mysql2/reserved_word_test.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,6 @@ def test_activerecord_model
8484
assert_nothing_raised { x.save }
8585
assert_nothing_raised { Group.find_by_order('y') }
8686
assert_nothing_raised { Group.find(1) }
87-
x = Group.find(1)
8887
end
8988

9089
# has_one association with reserved-word table name

activerecord/test/cases/associations_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ def test_should_construct_new_finder_sql_after_create
9595
def test_force_reload
9696
firm = Firm.new("name" => "A New Firm, Inc")
9797
firm.save
98-
firm.clients.each {|c|} # forcing to load all clients
98+
firm.clients.each {} # forcing to load all clients
9999
assert firm.clients.empty?, "New firm shouldn't have client objects"
100100
assert_equal 0, firm.clients.size, "New firm should have 0 clients"
101101

activerecord/test/cases/connection_pool_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ def test_checkout_behaviour
185185
assert_not_nil connection
186186
threads = []
187187
4.times do |i|
188-
threads << Thread.new(i) do |pool_count|
188+
threads << Thread.new(i) do
189189
connection = pool.connection
190190
assert_not_nil connection
191191
connection.close

0 commit comments

Comments
 (0)