lib/cucumber/gherkin/formatter/ansi_escapes.rb in cucumber-7.1.0 vs lib/cucumber/gherkin/formatter/ansi_escapes.rb in cucumber-8.0.0.rc.1
- old
+ new
@@ -52,11 +52,11 @@
'grey' => "\e[90m",
'bold' => "\e[1m"
}.freeze
ALIASES = Hash.new do |h, k|
- h[Regexp.last_match(1)] + ',bold' if k.to_s =~ /(.*)_arg/
+ "#{h[Regexp.last_match(1)]},bold" if k.to_s =~ /(.*)_arg/
end.merge(
'undefined' => 'yellow',
'pending' => 'yellow',
'executing' => 'grey',
'failed' => 'red',
@@ -72,10 +72,10 @@
a = pair.split('=')
ALIASES[a[0]] = a[1]
end
end
- ALIASES.keys.each do |key|
+ ALIASES.each_key do |key|
define_method(key) do
ALIASES[key].split(',').map { |color| COLORS[color] }.join('')
end
define_method("#{key}_arg") do