Skip to content

Commit 761234f

Browse files
committed
Get tests running with frozen string literals.
1 parent 368a28e commit 761234f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

lib/coderay/encoders/encoder.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ def setup options
146146
end
147147

148148
def get_output options
149-
options[:out] || ''
149+
options[:out] || ''.dup
150150
end
151151

152152
# Append data.to_s to the output. Returns the argument.

lib/coderay/encoders/html.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ def setup options
176176

177177
if options[:wrap] || options[:line_numbers]
178178
@real_out = @out
179-
@out = ''
179+
@out = ''.dup
180180
end
181181

182182
@break_lines = (options[:break_lines] == true)
@@ -314,7 +314,7 @@ def check_group_nesting name, kind
314314
end
315315

316316
def break_lines text, style
317-
reopen = ''
317+
reopen = ''.dup
318318
@opened.each_with_index do |kind, index|
319319
reopen << (@span_for_kinds[index > 0 ? [kind, *@opened[0...index]] : kind] || '<span>')
320320
end

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy