We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 91a6370 commit 9ccd1c6Copy full SHA for 9ccd1c6
lib/puppet/type/concat_file.rb
@@ -314,7 +314,7 @@ def fragment_content(r)
314
315
if self[:ensure_newline]
316
newline = Puppet::Util::Platform.windows? ? "\r\n" : "\n"
317
- fragment_content << newline unless %r{#{newline}\Z}.match?(fragment_content)
+ fragment_content = fragment_content.dup << newline unless %r{#{newline}\Z}.match?(fragment_content)
318
end
319
320
fragment_content
0 commit comments