summaryrefslogtreecommitdiffhomepage
path: root/lib/axlsx/workbook/worksheet/comment.rb
diff options
context:
space:
mode:
authorPaul Kmiec <[email protected]>2023-05-04 16:31:08 -0700
committerPaul Kmiec <[email protected]>2023-05-04 18:02:55 -0700
commitfabe8cb2571c8865270247ca78ddc01d493a9ee1 (patch)
tree27fe0b0df8c9bec8f746d92a0d128cad197027b2 /lib/axlsx/workbook/worksheet/comment.rb
parentfef93ec8ae2caf8a3f8310dbf8101c103e5905e4 (diff)
downloadcaxlsx-fabe8cb2571c8865270247ca78ddc01d493a9ee1.tar.gz
caxlsx-fabe8cb2571c8865270247ca78ddc01d493a9ee1.zip
Fix tests / code to work with frozen string literals
Diffstat (limited to 'lib/axlsx/workbook/worksheet/comment.rb')
-rw-r--r--lib/axlsx/workbook/worksheet/comment.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/axlsx/workbook/worksheet/comment.rb b/lib/axlsx/workbook/worksheet/comment.rb
index b0fd3e3b..1da779aa 100644
--- a/lib/axlsx/workbook/worksheet/comment.rb
+++ b/lib/axlsx/workbook/worksheet/comment.rb
@@ -61,17 +61,17 @@ module Axlsx
# serialize the object
# @param [String] str
# @return [String]
- def to_xml_string(str = "")
+ def to_xml_string(str = +'')
author = @comments.authors[author_index]
- str << ('<comment ref="' << ref << '" authorId="' << author_index.to_s << '">')
+ str << (+'<comment ref="' << ref << '" authorId="' << author_index.to_s << '">')
str << '<text>'
unless author.to_s == ""
str << '<r><rPr><b/><color indexed="81"/></rPr>'
- str << ("<t>" << ::CGI.escapeHTML(author.to_s) << ":\n</t></r>")
+ str << (+"<t>" << ::CGI.escapeHTML(author.to_s) << ":\n</t></r>")
end
str << '<r>'
str << '<rPr><color indexed="81"/></rPr>'
- str << ('<t>' << ::CGI.escapeHTML(text) << '</t></r></text>')
+ str << (+'<t>' << ::CGI.escapeHTML(text) << '</t></r></text>')
str << '</comment>'
end