From 6661350bcdd074b6bbc4cf277d65ef5856cb22ac Mon Sep 17 00:00:00 2001 From: Trent Ogren Date: Thu, 8 Aug 2013 13:34:17 -0500 Subject: Don't mutate the object passed into Color#rgb= --- lib/axlsx/stylesheet/color.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') 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}/) -- cgit v1.2.3