Ruby 1.8 treats Integer(nil) as 0, and 1.9 treats it as nil.  Switch to default gracefully.