marksweston / finance

A library for financial calculations in Ruby
https://rubygems.org/gems/finance
Other
221 stars 91 forks source link

Amortization(0).payment returns nil not zero #29

Closed mstahl closed 8 years ago

mstahl commented 10 years ago

The #payment method should be guaranteed to return a number, as 1) methods that depend on it are almost certainly expecting a number; and 2) if having an amount of zero is unrecoverable an exception should be thrown instead of returning nil, as returning nil is ambiguous.

tubedude commented 10 years ago

@mstahl , can you send a gist of the code you are trying to run? I wonder if it should raise an error, or return zero.

marksweston commented 8 years ago

@mstahl @tubedude is this issue still open?

mstahl commented 8 years ago

Yeah I don't even work at the company I was working at when I filed this so I'm gonna close it.