Skip to content

Commit

Permalink
Use *args
Browse files Browse the repository at this point in the history
  • Loading branch information
spiderbites committed Jan 7, 2025
1 parent ecf7ebf commit d680d7f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion actionpack/lib/action_controller/test_case.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def new_controller_thread # :nodoc:
# Because of the above, we need to prevent the clearing of thread locals, since
# no new thread is actually spawned in the test environment.
silence_redefinition_of_method :clean_up_thread_locals
def clean_up_thread_locals(_, _) # :nodoc:
def clean_up_thread_locals(*args) # :nodoc:
end

# Avoid a deadlock from the queue filling up
Expand Down
6 changes: 2 additions & 4 deletions actionpack/test/controller/live_stream_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -361,8 +361,8 @@ def @controller.new_controller_thread(&block)
original_new_controller_thread(&block)
end

def @controller.clean_up_thread_locals(_, _)
original_clean_up_thread_locals(_, _)
def @controller.clean_up_thread_locals(*args)
original_clean_up_thread_locals(*args)
end
end

Expand Down Expand Up @@ -531,8 +531,6 @@ def test_thread_locals_get_copied
Thread.current[:setting] = "aaron"

get :thread_locals
assert_equal "helloworld", response.body
assert_stream_closed
end

def test_isolated_state_get_copied
Expand Down

0 comments on commit d680d7f

Please sign in to comment.