Closed fcoury closed 12 years ago
Rainbow 1.1.2 behavior (wrong! - the variable is changed):
$ gem install rainbow Fetching: rainbow-1.1.2.gem (100%) Successfully installed rainbow-1.1.2 1 gem installed $ irb ree-1.8.7-2011.03 :001 > require 'rainbow' => true ree-1.8.7-2011.03 :002 > @string = "color-me-blind" => "color-me-blind" ree-1.8.7-2011.03 :003 > @string.color(:yellow) => "\e[33mcolor-me-blind\e[0m" ree-1.8.7-2011.03 :004 > @string => "\e[33mcolor-me-blind\e[0m"
Rainbow 1.1.1 behavior (correct - @string is not touched):
$ gem list rainbow *** LOCAL GEMS *** rainbow (1.1.1) $ irb ree-1.8.7-2011.03 :003 > require 'rainbow' => true ree-1.8.7-2011.03 :004 > @string = "color-me-blind" => "color-me-blind" ree-1.8.7-2011.03 :005 > @string.color(:yellow) => "\e[33mcolor-me-blind\e[0m" ree-1.8.7-2011.03 :006 > @string => "color-me-blind"
Right, it seems like we have a regression. I'll add a test and fix that.
Thanks for looking into this :)
Rainbow 1.1.2 behavior (wrong! - the variable is changed):
Rainbow 1.1.1 behavior (correct - @string is not touched):