lib/write_xlsx/workbook.rb in write_xlsx-0.85.8 vs lib/write_xlsx/workbook.rb in write_xlsx-0.85.9
- old
+ new
@@ -925,10 +925,10 @@
# unique colors. The WriteXLSX gem will be extended at a later stage to
# support the newer, semi-infinite, palette.
#
def set_custom_color(index, red = 0, green = 0, blue = 0)
# Match a HTML #xxyyzz style parameter
- if red =~ /^#(\w\w)(\w\w)(\w\w)/
+ if red.to_s =~ /^#(\w\w)(\w\w)(\w\w)/
red = $1.hex
green = $2.hex
blue = $3.hex
end