Fixed error on ruby 1.8
This commit is contained in:
@@ -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
|
||||||
Reference in New Issue
Block a user