lib/mothership/pretty.rb in mothership-0.0.10 vs lib/mothership/pretty.rb in mothership-0.0.11
- old
+ new
@@ -70,16 +70,16 @@
end
return str unless color
code = "\e[#{bright ? 9 : 3}#{COLOR_CODES[color]}m"
- "#{code}#{str.gsub("\e[0m", "\e[0m#{code}")}\e[0m"
+ "#{code}#{str.to_s.gsub("\e[0m", "\e[0m#{code}")}\e[0m"
end
# bold text
def b(str)
return str unless color?
code = "\e[1m"
- "#{code}#{str.gsub("\e[0m", "\e[0m#{code}")}\e[0m"
+ "#{code}#{str.to_s.gsub("\e[0m", "\e[0m#{code}")}\e[0m"
end
end