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

moonbitlang / core / 4094
94%

Build:
DEFAULT BRANCH: main
Ran 30 Apr 2026 07:40AM UTC
Jobs 1
Files 363
Run time 1min
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

30 Apr 2026 07:39AM UTC coverage: 94.61% (-0.005%) from 94.615%
4094

push

github

bobzhang
fix(array): abort on negative repeat count and guard against overflow

`Array::repeat(-1)` previously raised `RuntimeError: requested new array
is too large`, which is opaque and points the user at allocation rather
than at the bad argument. Negative `times` is almost always a caller
bug (sign error / off-by-one), so abort with `"negative repeat count"`
instead. A `times` of `0` still returns an empty array.

Also mirror the multiplicative-overflow guard already present in
`Bytes::repeat` so a wrap-around in `len * times` aborts cleanly with
`"repeat result too large"` instead of silently producing a wrong-sized
capacity hint.

Refs #3498. Split out from #3505 for easier review.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

5 of 6 new or added lines in 1 file covered. (83.33%)

14833 of 15678 relevant lines covered (94.61%)

218871.76 hits per line

Uncovered Changes

Lines Coverage ∆ File
1
99.56
-0.44% builtin/array.mbt
Jobs
ID Job ID Ran Files Coverage
1 4094.1 30 Apr 2026 07:40AM UTC 364
94.62
GitHub Action Run
Source Files on build 4094
  • Tree
  • List 363
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 1a77e4f2 on github
  • Prev Build on main (#4090)
  • Next Build on main (#4096)
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