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

dblock / ruby-enum / #40
100%
master: 100%

Build:
Build:
LAST BUILD BRANCH: dblock/coveralls-github-token
DEFAULT BRANCH: master
Ran 15 Aug 2026 05:10PM UTC
Jobs 1
Files 8
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

15 Aug 2026 05:10PM UTC coverage: 100.0%. Remained the same
#40

Pull #63

dblock
Fix values, value? and key returning a superclass' overridden value (#62)

values, value? and key each had their own logic for merging a
subclass' enums with its superclass', instead of using the
memoized, deduping _enum_hash used by to_h, keys, key?, value,
parse and each.

values did a recursive list concatenation (superclass.values +
result), so a subclass redefining a parent's key showed both the
parent's stale value and its own override.

value? and key relied on _enums_by_value, a hash merged by value
rather than by key, so a superclass' stale value=>enum mapping for
an overridden key was never overwritten (it's a different hash
key), leaving value?/key returning true/the key for values that no
longer belong to that key.

Fixed by:
* values now reads from _enum_hash like every other method.
* _enums_by_value is now derived from _enum_hash (keyed by key)
  instead of merged directly by value, so overridden keys can't
  leave stale by-value entries behind.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Pull Request #63: Fix values including a superclass' overridden value

3 of 3 new or added lines in 1 file covered. (100.0%)

157 of 157 relevant lines covered (100.0%)

6.55 hits per line

Jobs
ID Job ID Ran Files Coverage
1 #40.1 15 Aug 2026 05:10PM UTC 8
100.0
Source Files on build #40
  • Tree
  • List 8
  • Changed 1
  • Source Changed 0
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Pull Request #63
  • PR Base - master (#)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc