aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test
diff options
context:
space:
mode:
authorRyuta Kamizono <kamipo@gmail.com>2019-01-09 18:09:01 +0900
committerGitHub <noreply@github.com>2019-01-09 18:09:01 +0900
commitea65d92f1924648e72f93bb0e8e5fc62a56d0bac (patch)
tree9e8ebde83d6f1fd2c0eaff195ee54c3f42e3ae88 /activesupport/test
parent69ca787bd26c0306cdfde25de76036686fc39f4f (diff)
downloadrails-ea65d92f1924648e72f93bb0e8e5fc62a56d0bac.tar.gz
rails-ea65d92f1924648e72f93bb0e8e5fc62a56d0bac.tar.bz2
rails-ea65d92f1924648e72f93bb0e8e5fc62a56d0bac.zip
Enable `Lint/UselessAssignment` cop to avoid unused variable warnings (#34904)
* Enable `Lint/UselessAssignment` cop to avoid unused variable warnings Since we've addressed the warning "assigned but unused variable" frequently. 370537de05092aeea552146b42042833212a1acc 3040446cece8e7a6d9e29219e636e13f180a1e03 5ed618e192e9788094bd92c51255dda1c4fd0eae 76ebafe594fc23abc3764acc7a3758ca473799e5 And also, I've found the unused args in c1b14ad which raises no warnings by the cop, it shows the value of the cop.
Diffstat (limited to 'activesupport/test')
-rw-r--r--activesupport/test/test_case_test.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activesupport/test/test_case_test.rb b/activesupport/test/test_case_test.rb
index 8698c66e6d..56cd2665e0 100644
--- a/activesupport/test/test_case_test.rb
+++ b/activesupport/test/test_case_test.rb
@@ -104,7 +104,7 @@ class AssertionsTest < ActiveSupport::TestCase
def test_expression_is_evaluated_in_the_appropriate_scope
silence_warnings do
local_scope = "foo"
- local_scope = local_scope # to suppress unused variable warning
+ _ = local_scope # to suppress unused variable warning
assert_difference("local_scope; @object.num") { @object.increment }
end
end