All pastes #23999 Raw Edit

Someone

public text v1 · immutable
#23999 ·published 2005-09-26 22:16 UTC
rendered paste body
        total_packs = cigarettes.divmod(25)
        total_packs_bought = total_packs[0] + (total_packs[1] > 0) ? 1 : 0 <- line 31
        saved = total_packs_bought * cost_per_pack

/home/jordan/scripts/scs.rb:31:in `+': true can't be coerced into Fixnum (TypeError)
        from /home/jordan/scripts/scs.rb:31