Skip to content

Commit fa6f21e

Browse files
authored
Merge pull request #620 from HashNotAdam/explicitly_define_mutable_strings
Explicitly define mutable strings
2 parents 02f5e4b + ec0fff8 commit fa6f21e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/roo/formatters/yaml.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ def to_yaml(prefix = {}, from_row = nil, from_column = nil, to_row = nil, to_col
1313
from_column ||= first_column(sheet)
1414
to_column ||= last_column(sheet)
1515

16-
result = "--- \n"
16+
result = String.new("--- \n")
1717
from_row.upto(to_row) do |row|
1818
from_column.upto(to_column) do |col|
1919
next if empty?(row, col, sheet)

test/roo/test_open_office.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ def test_bug_ric
224224
assert workbook.empty?("C", 1)
225225
assert workbook.empty?("D", 1)
226226
expected = 1
227-
letter = "e"
227+
letter = String.new("e")
228228
while letter <= "u"
229229
assert_equal expected, workbook.cell(letter, 1)
230230
letter.succ!

0 commit comments

Comments
 (0)