lib/lograge/formatters/ltsv.rb in lograge-0.4.0.pre2 vs lib/lograge/formatters/ltsv.rb in lograge-0.4.0.pre4
- old
+ new
@@ -16,12 +16,11 @@
if key == :error
# Exactly preserve the previous output
# Parsing this can be ambigious if the error messages contains
# a single quote
value = "'#{escape value}'"
- else
- # Ensure that we always have exactly two decimals
- value = Kernel.format('%.2f', value) if value.is_a? Float
+ elsif value.is_a? Float
+ value = Kernel.format('%.2f', value)
end
"#{key}:#{value}"
end