lib/rdoc/generator/pot/po_entry.rb in rdoc-6.0.0.beta3 vs lib/rdoc/generator/pot/po_entry.rb in rdoc-6.0.0.beta4

- old
+ new

@@ -1,6 +1,6 @@ -# frozen_string_literal: false +# frozen_string_literal: true ## # A PO entry in PO class RDoc::Generator::POT::POEntry @@ -38,15 +38,15 @@ ## # Returns the PO entry in PO format. def to_s entry = '' - entry << format_translator_comment - entry << format_extracted_comment - entry << format_references - entry << format_flags - entry << <<-ENTRY + entry += format_translator_comment + entry += format_extracted_comment + entry += format_references + entry += format_flags + entry += <<-ENTRY msgid #{format_message(@msgid)} msgstr #{format_message(@msgstr)} ENTRY end @@ -73,13 +73,13 @@ return '' unless comment return '' if comment.empty? formatted_comment = '' comment.each_line do |line| - formatted_comment << "#{mark} #{line}" + formatted_comment += "#{mark} #{line}" end - formatted_comment << "\n" unless formatted_comment.end_with?("\n") + formatted_comment += "\n" unless formatted_comment.end_with?("\n") formatted_comment end def format_translator_comment format_comment('#', @translator_comment) @@ -92,11 +92,11 @@ def format_references return '' if @references.empty? formatted_references = '' @references.sort.each do |file, line| - formatted_references << "\#: #{file}:#{line}\n" + formatted_references += "\#: #{file}:#{line}\n" end formatted_references end def format_flags @@ -109,11 +109,11 @@ def format_message message return "\"#{escape(message)}\"" unless message.include?("\n") formatted_message = '""' message.each_line do |line| - formatted_message << "\n" - formatted_message << "\"#{escape(line)}\"" + formatted_message += "\n" + formatted_message += "\"#{escape(line)}\"" end formatted_message end def escape string