lib/nanaimo/object.rb in nanaimo-0.2.3 vs lib/nanaimo/object.rb in nanaimo-0.2.4

- old
+ new

@@ -1,5 +1,7 @@ +# frozen_string_literal: true + module Nanaimo # An object that belongs to a plist. # class Object # @return The underlying native Ruby value @@ -71,10 +73,10 @@ # A data object in a Plist, represented by a binary-encoded string. # class Data < Object def initialize(value, annotation) - value &&= value.force_encoding(Encoding::BINARY) + value &&= value.dup.force_encoding(Encoding::BINARY) super(value, annotation) end def as_ruby value