Wrap around to the first colour when all the colours are used

This commit is contained in:
Craig R Webster authored and David Dollar committed 2012-01-16 09:35:51 -05:00
1 parent c1f279aa6f
commit 7132cacbf6
1 file changed
+2 -1
+2 -1
View File
@@ -184,7 +184,8 @@ private ######################################################################
def next_color def next_color
@current_color ||= -1 @current_color ||= -1
@current_color += 1 @current_color += 1
@current_color >= COLORS.length ? "" : COLORS[@current_color] @current_color = 0 if COLORS.length < @current_color
COLORS[@current_color]
end end
module Env module Env