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

RubyMoney / money / 1450
100%

Build:
DEFAULT BRANCH: master
Ran 07 Jan 2019 11:24PM UTC
Jobs 13
Files 38
Run time 8min
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

pending completion
1450

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
```

1786 of 1786 relevant lines covered (100.0%)

501.93 hits per line

Jobs
ID Job ID Ran Files Coverage
1 1450.1 (1.9.3) 07 Jan 2019 11:24PM UTC 0
99.96
Travis Job 1450.1
2 1450.2 (2.0) 07 Jan 2019 11:24PM UTC 0
99.96
Travis Job 1450.2
3 1450.3 (2.1.10) 07 Jan 2019 11:25PM UTC 0
99.96
Travis Job 1450.3
4 1450.4 (2.2.10) 07 Jan 2019 11:25PM UTC 0
99.96
Travis Job 1450.4
5 1450.5 (2.3.7) 07 Jan 2019 11:26PM UTC 0
99.96
Travis Job 1450.5
6 1450.6 (2.4.4) 07 Jan 2019 11:25PM UTC 0
99.96
Travis Job 1450.6
7 1450.7 (2.5.1) 07 Jan 2019 11:27PM UTC 0
99.96
Travis Job 1450.7
9 1450.9 (jruby-9.0.5.0) 07 Jan 2019 11:29PM UTC 0
0.0
Travis Job 1450.9
10 1450.10 (jruby-9.1.17.0) 07 Jan 2019 11:29PM UTC 0
0.0
Travis Job 1450.10
11 1450.11 (jruby-9.2.0.0) 07 Jan 2019 11:29PM UTC 0
0.0
Travis Job 1450.11
12 1450.12 (rbx-3) 07 Jan 2019 11:31PM UTC 0
99.97
Travis Job 1450.12
13 1450.13 (ruby-head) 07 Jan 2019 11:28PM UTC 0
99.96
Travis Job 1450.13
14 1450.14 (jruby-head) 07 Jan 2019 11:32PM UTC 0
0.0
Travis Job 1450.14
Source Files on build 1450
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #1450
  • 6da58123 on github
  • Prev Build on master (#1449)
  • Next Build on master (#1451)
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