Skip to content

Commit

Permalink
Fix frozen string literal warnings on Ruby 3.4 (#65)
Browse files Browse the repository at this point in the history
* Fix frozen string literal warnings on Ruby 3.4

* Use dup to ensure exact compatibility with original impl
  • Loading branch information
mattbrictson authored Dec 26, 2024
1 parent 7a39fa2 commit 456efb9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/plist/parser.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion test/test_data_elements.rb
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def test_generator_io_and_file
</data>
END

expected.chomp!
expected = expected.chomp

fd = IO.sysopen('test/assets/example_data.bin')
io = IO.open(fd, 'r')
Expand Down

0 comments on commit 456efb9

Please sign in to comment.