diff options
| author | Trent Ogren <[email protected]> | 2013-08-08 13:34:17 -0500 |
|---|---|---|
| committer | Trent Ogren <[email protected]> | 2013-08-08 13:34:17 -0500 |
| commit | 6661350bcdd074b6bbc4cf277d65ef5856cb22ac (patch) | |
| tree | 2069313733b9e8d3159526df6774aade87c47189 /lib/axlsx/stylesheet/color.rb | |
| parent | 2c3a0b821abaef509fefee0f6e096073180c3337 (diff) | |
| download | caxlsx-6661350bcdd074b6bbc4cf277d65ef5856cb22ac.tar.gz caxlsx-6661350bcdd074b6bbc4cf277d65ef5856cb22ac.zip | |
Don't mutate the object passed into Color#rgb=
Diffstat (limited to 'lib/axlsx/stylesheet/color.rb')
| -rw-r--r-- | lib/axlsx/stylesheet/color.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/axlsx/stylesheet/color.rb b/lib/axlsx/stylesheet/color.rb index 744e63d5..e736af7f 100644 --- a/lib/axlsx/stylesheet/color.rb +++ b/lib/axlsx/stylesheet/color.rb @@ -51,7 +51,7 @@ module Axlsx # @see color def rgb=(v) Axlsx::validate_string(v) - v.upcase! + v = v.upcase v = v * 3 if v.size == 2 v = v.rjust(8, 'FF') raise ArgumentError, "Invalid color rgb value: #{v}." unless v.match(/[0-9A-F]{8}/) |
