]> source.dussan.org Git - redmine.git/commitdiff
"rake test:coverage" fails in Ruby 2.5 and 2.6 (#30967).
authorGo MAEDA <maeda@farend.jp>
Sat, 4 May 2019 01:24:38 +0000 (01:24 +0000)
committerGo MAEDA <maeda@farend.jp>
Sat, 4 May 2019 01:24:38 +0000 (01:24 +0000)
This commit fixes a wrong change done in r17938.

git-svn-id: http://svn.redmine.org/redmine/trunk@18120 e93f8b46-1217-0410-a6f0-8f06a7374b81

test/coverage/html_formatter.rb

index 2ae85bd30e60a4257d705db47e3f99295d9b0806..9da488fb0591ab18d348a95346499bad68cd7463 100644 (file)
@@ -26,11 +26,11 @@ module Redmine
     class HtmlFormatter
       def format(result)
         File.open(File.join(output_path, "index.html"), "w") do |file|
-          file.puts template('index').result(binding).force_encoding('utf-8')
+          file.puts template('index').result(binding)
         end
         result.source_files.each do |source_file|
           File.open(File.join(output_path, source_file_result(source_file)), "w") do |file|
-            file.puts template('source').result(binding)
+            file.puts template('source').result(binding).force_encoding('utf-8')
           end
         end
       end