diff options
| author | Paul Kmiec <[email protected]> | 2023-05-04 16:31:08 -0700 |
|---|---|---|
| committer | Paul Kmiec <[email protected]> | 2023-05-04 18:02:55 -0700 |
| commit | fabe8cb2571c8865270247ca78ddc01d493a9ee1 (patch) | |
| tree | 27fe0b0df8c9bec8f746d92a0d128cad197027b2 /lib/axlsx/workbook/workbook.rb | |
| parent | fef93ec8ae2caf8a3f8310dbf8101c103e5905e4 (diff) | |
| download | caxlsx-fabe8cb2571c8865270247ca78ddc01d493a9ee1.tar.gz caxlsx-fabe8cb2571c8865270247ca78ddc01d493a9ee1.zip | |
Fix tests / code to work with frozen string literals
Diffstat (limited to 'lib/axlsx/workbook/workbook.rb')
| -rw-r--r-- | lib/axlsx/workbook/workbook.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/axlsx/workbook/workbook.rb b/lib/axlsx/workbook/workbook.rb index bd70a836..ab16a4ed 100644 --- a/lib/axlsx/workbook/workbook.rb +++ b/lib/axlsx/workbook/workbook.rb @@ -405,11 +405,11 @@ module Axlsx # Serialize the workbook # @param [String] str # @return [String] - def to_xml_string(str = '') + def to_xml_string(str = +'') add_worksheet(name: 'Sheet1') unless worksheets.size > 0 str << '<?xml version="1.0" encoding="UTF-8"?>' - str << ('<workbook xmlns="' << XML_NS << '" xmlns:r="' << XML_NS_R << '">') - str << ('<workbookPr date1904="' << @@date1904.to_s << '"/>') + str << (+'<workbook xmlns="' << XML_NS << '" xmlns:r="' << XML_NS_R << '">') + str << (+'<workbookPr date1904="' << @@date1904.to_s << '"/>') views.to_xml_string(str) str << '<sheets>' if is_reversed @@ -422,7 +422,7 @@ module Axlsx unless pivot_tables.empty? str << '<pivotCaches>' pivot_tables.each do |pivot_table| - str << ('<pivotCache cacheId="' << pivot_table.cache_definition.cache_id.to_s << '" r:id="' << pivot_table.cache_definition.rId << '"/>') + str << (+'<pivotCache cacheId="' << pivot_table.cache_definition.cache_id.to_s << '" r:id="' << pivot_table.cache_definition.rId << '"/>') end str << '</pivotCaches>' end |
