diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 8ae5f7ffc..574a8daab 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -231,13 +231,6 @@ Lint/ParenthesesAsGroupedExpression: - 'test/unit/attachment_test.rb' - 'test/unit/lib/redmine/export/pdf_test.rb' -# This cop supports safe autocorrection (--autocorrect). -Lint/RedundantStringCoercion: - Exclude: - - 'lib/redmine/export/pdf/issues_pdf_helper.rb' - - 'test/functional/repositories_filesystem_controller_test.rb' - - 'test/functional/repositories_git_controller_test.rb' - # This cop supports safe autocorrection (--autocorrect). Lint/SendWithMixinArgument: Exclude: diff --git a/lib/redmine/export/pdf/issues_pdf_helper.rb b/lib/redmine/export/pdf/issues_pdf_helper.rb index 1b94685f3..b74531b38 100644 --- a/lib/redmine/export/pdf/issues_pdf_helper.rb +++ b/lib/redmine/export/pdf/issues_pdf_helper.rb @@ -38,7 +38,7 @@ module Redmine i = 1 issue.ancestors.visible.each do |ancestor| pdf.set_x(base_x + i) - buf = "#{ancestor.tracker} # #{ancestor.id} (#{ancestor.status.to_s}): #{ancestor.subject}" + buf = "#{ancestor.tracker} # #{ancestor.id} (#{ancestor.status}): #{ancestor.subject}" pdf.RDMMultiCell(190 - i, 5, buf) i += 1 if i < 35 end diff --git a/test/functional/repositories_filesystem_controller_test.rb b/test/functional/repositories_filesystem_controller_test.rb index 54d3eea7c..0bcb690f3 100644 --- a/test/functional/repositories_filesystem_controller_test.rb +++ b/test/functional/repositories_filesystem_controller_test.rb @@ -126,7 +126,7 @@ class RepositoriesFilesystemControllerTest < Redmine::RepositoryControllerTest if @ruby19_non_utf8_pass puts "TODO: show repository file contents test fails " \ "when Encoding.default_external is not UTF-8. " \ - "Current value is '#{Encoding.default_external.to_s}'" + "Current value is '#{Encoding.default_external}'" else assert_select 'tr#L3 td.line-code', :text => /日本語/ end diff --git a/test/functional/repositories_git_controller_test.rb b/test/functional/repositories_git_controller_test.rb index 70d795068..7ac853594 100644 --- a/test/functional/repositories_git_controller_test.rb +++ b/test/functional/repositories_git_controller_test.rb @@ -832,6 +832,6 @@ class RepositoriesGitControllerTest < Redmine::RepositoryControllerTest def puts_pass_on_not_utf8 puts "TODO: This test fails " + "when Encoding.default_external is not UTF-8. " + - "Current value is '#{Encoding.default_external.to_s}'" + "Current value is '#{Encoding.default_external}'" end end