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

dblock / ruby-enum
100%
master: 100%

Build:
Build:
LAST BUILD BRANCH: dblock/coveralls-github-token
DEFAULT BRANCH: master
Repo Added 30 Dec 2025 05:05PM UTC
Files 7
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

LAST BUILD ON BRANCH fix-values-override-issue-62
branch: fix-values-override-issue-62
CHANGE BRANCH
x
Reset
  • fix-values-override-issue-62
  • HEAD
  • dblock/coveralls-github-token
  • document-performance
  • fix-subclass-no-defines
  • master
  • memoize-enum-hash
  • rename-ruby-namespace
  • replace-code-climate-with-coveralls
  • ruby-4.0
  • subclass-inherited-values
  • update-copyright-year

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

Relevant lines Covered
Build:
Build:
157 RELEVANT LINES 157 COVERED LINES
6.55 HITS PER LINE
Source Files on fix-values-override-issue-62
  • Tree
  • List 8
  • Changed 1
  • Source Changed 0
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line

Recent builds

Builds Branch Commit Type Ran Committer Via Coverage
#40 fix-values-override-issue-62 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, k... Pull #63 15 Aug 2026 05:10PM UTC dblock
100.0
#39 fix-values-override-issue-62 Fix values including a superclass' overridden value (#62) values used its own explicit recursive concatenation (superclass.values + result) instead of the merged, deduping _enum_hash used by to_h, keys, key?, value, value?, key, parse and each. T... Pull #63 15 Aug 2026 05:07PM UTC dblock
100.0
See All Builds (51)
  • Repo on GitHub
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