lib/fugit/duration.rb in fugit-0.9.3 vs lib/fugit/duration.rb in fugit-0.9.4
- old
+ new
@@ -144,10 +144,10 @@
def deflate
id = inflate
h = id.h.dup
- s = h.delete(:sec)
+ s = h.delete(:sec) || 0
INFLA_KEYS.each do |k, v|
n = s / v[:s]; next if n == 0
m = s % v[:s]