blinry / nom

"Lose weight and hair through stress and poor nutrition"
GNU General Public License v2.0
64 stars 4 forks source link

Crash in truncate_date():lib/nom.rb during initial run #2

Closed spekode closed 9 years ago

spekode commented 9 years ago

When running nom for the first time you get an error.

Error: nom/nom.rb:286:in `-': expected numeric (TypeError)

truncate_date tries to subtract @weights.last_real before there are any weights recorded, so @weights.last_real is nil.

blinry commented 9 years ago

Oh my, kind of a worst-case bug that was introduced after reordering some code. Thanks for reporting!

If you'd like to try again, I pushed nom 0.1.2.2 to Rubygems.