Fixed error on ruby 1.8

This commit is contained in:
Christian Mehlmauer
2013-01-14 23:48:39 +01:00
parent 8d232a8c39
commit 8057f6127f

View File

@@ -150,7 +150,7 @@ end
# Override for puts to enable logging # Override for puts to enable logging
def puts(o = "") def puts(o = "")
# remove color for logging # remove color for logging
temp = o.gsub(/\e\[\d+m(?<text>.*)?\e\[0m/, '\k<text>') temp = o.gsub(/\e\[\d+m(.*)?\e\[0m/, '\1')
File.open(LOG_FILE, "a+") { |f| f.puts(temp) } File.open(LOG_FILE, "a+") { |f| f.puts(temp) }
super(o) super(o)
end end