summaryrefslogtreecommitdiffhomepage
path: root/lib/axlsx/drawing/bar_series.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/drawing/bar_series.rb
parentfef93ec8ae2caf8a3f8310dbf8101c103e5905e4 (diff)
downloadcaxlsx-fabe8cb2571c8865270247ca78ddc01d493a9ee1.tar.gz
caxlsx-fabe8cb2571c8865270247ca78ddc01d493a9ee1.zip
Fix tests / code to work with frozen string literals
Diffstat (limited to 'lib/axlsx/drawing/bar_series.rb')
-rw-r--r--lib/axlsx/drawing/bar_series.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/axlsx/drawing/bar_series.rb b/lib/axlsx/drawing/bar_series.rb
index 86ca4e88..c744175f 100644
--- a/lib/axlsx/drawing/bar_series.rb
+++ b/lib/axlsx/drawing/bar_series.rb
@@ -58,19 +58,19 @@ module Axlsx
# Serializes the object
# @param [String] str
# @return [String]
- def to_xml_string(str = '')
+ def to_xml_string(str = +'')
super(str) do
colors.each_with_index do |c, index|
str << '<c:dPt>'
- str << ('<c:idx val="' << index.to_s << '"/>')
+ str << (+'<c:idx val="' << index.to_s << '"/>')
str << '<c:spPr><a:solidFill>'
- str << ('<a:srgbClr val="' << c << '"/>')
+ str << (+'<a:srgbClr val="' << c << '"/>')
str << '</a:solidFill></c:spPr></c:dPt>'
end
if series_color
str << '<c:spPr><a:solidFill>'
- str << ('<a:srgbClr val="' << series_color << '"/>')
+ str << (+'<a:srgbClr val="' << series_color << '"/>')
str << '</a:solidFill>'
str << '</c:spPr>'
end
@@ -78,7 +78,7 @@ module Axlsx
@labels.to_xml_string(str) unless @labels.nil?
@data.to_xml_string(str) unless @data.nil?
# this is actually only required for shapes other than box
- str << ('<c:shape val="' << shape.to_s << '"></c:shape>')
+ str << (+'<c:shape val="' << shape.to_s << '"></c:shape>')
end
end