From ea65d92f1924648e72f93bb0e8e5fc62a56d0bac Mon Sep 17 00:00:00 2001 From: Ryuta Kamizono Date: Wed, 9 Jan 2019 18:09:01 +0900 Subject: 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. --- guides/rails_guides/generator.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'guides/rails_guides/generator.rb') diff --git a/guides/rails_guides/generator.rb b/guides/rails_guides/generator.rb index 48e90510e1..fd33c3f8a7 100644 --- a/guides/rails_guides/generator.rb +++ b/guides/rails_guides/generator.rb @@ -63,9 +63,9 @@ module RailsGuides end def mobi - mobi = "ruby_on_rails_guides_#{@version || @edge[0, 7]}" - mobi += ".#{@language}" if @language - mobi += ".mobi" + mobi = +"ruby_on_rails_guides_#{@version || @edge[0, 7]}" + mobi << ".#{@language}" if @language + mobi << ".mobi" end def initialize_dirs -- cgit v1.2.3