Fix NoMethodError on fail
``` .../tool/lib/colorize.rb:56:in `resolve_color': undefined method `gsub' for an instance of Symbol (NoMethodError) color.gsub(/\b[a-z][\w ]+/) do |n| ^^^^^ from .../tool/lib/colorize.rb:47:in `decorate' from .../tool/lib/test/unit.rb:1012:in `block in failed' ```
This commit is contained in:
parent
505715ddf1
commit
9765ada69c
@ -53,7 +53,7 @@ class Colorize
|
|||||||
|
|
||||||
def resolve_color(color = @color, seen = {}, colors = nil)
|
def resolve_color(color = @color, seen = {}, colors = nil)
|
||||||
return unless @colors
|
return unless @colors
|
||||||
color.gsub(/\b[a-z][\w ]+/) do |n|
|
color.to_s.gsub(/\b[a-z][\w ]+/) do |n|
|
||||||
n.gsub!(/\W+/, "_")
|
n.gsub!(/\W+/, "_")
|
||||||
n.downcase!
|
n.downcase!
|
||||||
c = seen[n] and next c
|
c = seen[n] and next c
|
||||||
|
Loading…
x
Reference in New Issue
Block a user