• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

RubyMoney / money / 1450 / 14
100%
master: 100%

Build:
DEFAULT BRANCH: master
Ran 07 Jan 2019 11:32PM UTC
Files 37
Run time 4s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

07 Jan 2019 11:19PM UTC coverage: 0.0%. Remained the same
jruby-head

push

travis-ci

antstorm
Prevent Divide By Zero in Money#allocate (#841)

This leads to an error when attempting to allocate a zero value, and the
zero value is the first argument in parts.

Example:

```
[1] pry(main)> Money.new(100, "USD").allocate([1, 1, 0])
=> [#<Money fractional:50 currency:USD>, #<Money fractional:50 currency:USD>, #<Money fractional:0 currency:USD>]

[2] pry(main)> Money.new(100, "USD").allocate([0, 1, 1])
ZeroDivisionError: divided by 0

[3] pry(main)> Money.new(100, "USD").allocate([1, 1, 0.0])
=> [#<Money fractional:50 currency:USD>, #<Money fractional:50 currency:USD>, #<Money fractional:0 currency:USD>]

[4] pry(main)> Money.new(100, "USD").allocate([0.0, 1, 1])
FloatDomainError: NaN
```

0 of 2838 relevant lines covered (0.0%)

0.0 hits per line

Source Files on job 1450.14 (jruby-head)
  • Tree
  • List 0
  • Changed 2
  • Source Changed 2
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 1429
  • Travis Job 1450.14
  • 6da58123 on github
  • Prev Job for jruby-head on master (#1449.14)
  • Next Job for jruby-head on master (#1451.14)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc