Skip to content

NPV calculation has side effects #28

@adailey14

Description

@adailey14

the NPV calculation (and probably others) have unexpected side effects on the input array. It will turn all numbers in the input array into DecNums.

Example:

x = [1,2,3]
=> [1, 2, 3]
x.npv(1.5)
=> DecNum('2.28')
x
=> [DecNum('1'), DecNum('2'), DecNum('3')]

This example is from the rails console using ruby 2.0.0-p353 and rails 3.2.13

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions