From 79f07b73506d1873e6864de26b313ae550f93a19 Mon Sep 17 00:00:00 2001 From: erwanlr Date: Wed, 14 May 2014 18:33:23 +0200 Subject: [PATCH] Properly removes the colour sequence from log. Fixes #480 --- lib/common/hacks.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/common/hacks.rb b/lib/common/hacks.rb index fbc420a0..9db7e88e 100644 --- a/lib/common/hacks.rb +++ b/lib/common/hacks.rb @@ -51,7 +51,7 @@ end def puts(o = '') # remove color for logging if o.respond_to?(:gsub) - temp = o.gsub(/\e\[\d+m(.*)?\e\[0m/, '\1') + temp = o.gsub(/\e\[\d+m/, '') File.open(LOG_FILE, 'a+') { |f| f.puts(temp) } end super(o)