Skip to content

Commit d56f5c8

Browse files
Remove unused assignments
1 parent 54683f3 commit d56f5c8

File tree

4 files changed

+4
-8
lines changed

4 files changed

+4
-8
lines changed

actionpack/lib/action_dispatch/middleware/cookies.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,6 @@ def initialize(app)
339339
end
340340

341341
def call(env)
342-
cookie_jar = nil
343342
status, headers, body = @app.call(env)
344343

345344
if cookie_jar = env['action_dispatch.cookies']

activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -286,12 +286,10 @@ def reap
286286
private
287287

288288
def release(conn)
289-
thread_id = nil
290-
291-
if @reserved_connections[current_connection_id] == conn
292-
thread_id = current_connection_id
289+
thread_id = if @reserved_connections[current_connection_id] == conn
290+
current_connection_id
293291
else
294-
thread_id = @reserved_connections.keys.find { |k|
292+
@reserved_connections.keys.find { |k|
295293
@reserved_connections[k] == conn
296294
}
297295
end

activesupport/lib/active_support/testing/performance/jruby.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def record
4242
klasses.each do |klass|
4343
fname = output_filename(klass)
4444
FileUtils.mkdir_p(File.dirname(fname))
45-
file = File.open(fname, 'wb') do |file|
45+
File.open(fname, 'wb') do |file|
4646
klass.new(@data).printProfile(file)
4747
end
4848
end

railties/lib/rails/commands/runner.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
end
1010

1111
ARGV.clone.options do |opts|
12-
script_name = File.basename($0)
1312
opts.banner = "Usage: runner [options] ('Some.ruby(code)' or a filename)"
1413

1514
opts.separator ""

0 commit comments

Comments
 (0)