diff --git a/lib/plist/parser.rb b/lib/plist/parser.rb index 038b194..7a4ce12 100755 --- a/lib/plist/parser.rb +++ b/lib/plist/parser.rb @@ -56,7 +56,7 @@ def tag_start(name, attributes) def text(contents) if @open.last - @open.last.text ||= '' + @open.last.text ||= ''.dup @open.last.text.concat(contents) end end diff --git a/test/test_data_elements.rb b/test/test_data_elements.rb index 02fcf20..c5358cf 100644 --- a/test/test_data_elements.rb +++ b/test/test_data_elements.rb @@ -53,7 +53,7 @@ def test_generator_io_and_file END - expected.chomp! + expected = expected.chomp fd = IO.sysopen('test/assets/example_data.bin') io = IO.open(fd, 'r')