Open wQwRtaufxJw7UFLCXzXz opened 11 years ago
Ruby version:
ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-darwin11.4.2]
Rails version:
Rails 3.2.11
The most interesting thing is that SOMETIMES (I'd say about 50%) This random TypeError will show, and sometimes it works completely fine. It's so weird.
#<Class:0x007f9555d36fc0> can't be coerced into BigDecimal
in
/Users/ctwiz/.rvm/gems/ruby-1.9.3-p194/bundler/gems/finance-990fd53d46c3/lib/finance/cashflows.rb:118:in `**'
/Users/ctwiz/.rvm/gems/ruby-1.9.3-p194/bundler/gems/finance-990fd53d46c3/lib/finance/cashflows.rb:118:in `block in xnpv'
/Users/ctwiz/.rvm/gems/ruby-1.9.3-p194/bundler/gems/finance-990fd53d46c3/lib/finance/cashflows.rb:117:in `each'
/Users/ctwiz/.rvm/gems/ruby-1.9.3-p194/bundler/gems/finance-990fd53d46c3/lib/finance/cashflows.rb:117:in `inject'
/Users/ctwiz/.rvm/gems/ruby-1.9.3-p194/bundler/gems/finance-990fd53d46c3/lib/finance/cashflows.rb:117:in `xnpv'
/Users/ctwiz/.rvm/gems/ruby-1.9.3-p194/bundler/gems/finance-990fd53d46c3/lib/finance/cashflows.rb:35:in `values'
/Users/ctwiz/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/bigdecimal/jacobian.rb:61:in `dfdxi'
/Users/ctwiz/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/bigdecimal/jacobian.rb:80:in `block in jacobian'
/Users/ctwiz/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/bigdecimal/jacobian.rb:79:in `each'
/Users/ctwiz/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/bigdecimal/jacobian.rb:79:in `jacobian'
/Users/ctwiz/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/bigdecimal/newton.rb:58:in `nlsolve'
/Users/ctwiz/.rvm/gems/ruby-1.9.3-p194/bundler/gems/finance-990fd53d46c3/lib/finance/cashflows.rb:100:in `xirr'
actionpack (3.2.11) lib/action_view/template.rb:145:in `block in render'
activesupport (3.2.11) lib/active_support/notifications.rb:125:in `instrument'
actionpack (3.2.11) lib/action_view/template.rb:143:in `render'
@ctwiz is this still a live issue for you?
@marksweston I'm no longer attached to that project. Sorry!
in
changing
by adding the line
to the else statements
seems to fix it. Is this a bug you recognize?