Fixed input that contains color codes

I used your tutorial on this to make a gem of my own (my first actually) and it uses this gem. But it acts strange when color codes are used so I have fixed that. My gem is called muchdoge by the way, and it re-defines puts to make all output using puts dogeified! It's more of a prank than something useful.
It would be nice if this method accepted both arrays and non-arrays for the `patterns` value.  Perhaps we could change this to be `Array(patterns).map ...` so that both cases are automatically handled.  An extra test case would be needed to handle the alternate input format.