spec/extensions/encoding_helpers.rb in prawn-2.2.2 vs spec/extensions/encoding_helpers.rb in prawn-2.3.0
- old
+ new
@@ -1,9 +1,11 @@
+# frozen_string_literal: true
+
module EncodingHelpers
def win1252_string(str)
- str.force_encoding(Encoding::Windows_1252)
+ str.dup.force_encoding(Encoding::Windows_1252)
end
def bin_string(str)
- str.force_encoding(Encoding::ASCII_8BIT)
+ str.dup.force_encoding(Encoding::ASCII_8BIT)
end
end