lib/rouge/formatter.rb in rouge-3.2.1 vs lib/rouge/formatter.rb in rouge-3.3.0

- old
+ new

@@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- # +# frozen_string_literal: true module Rouge # A Formatter takes a token stream and formats it for human viewing. class Formatter # @private @@ -31,10 +32,10 @@ # Format a token stream. def format(tokens, &b) return stream(tokens, &b) if block_given? - out = '' + out = String.new('') stream(tokens) { |piece| out << piece } out end