Skip to content

Add Hash#key and Hash.ruby2_keywords_hash / ruby2_keywords_hash? - #470

Merged
tannevaled merged 1 commit into
mainfrom
feat/cluster40
Aug 27, 2026
Merged

tannevaled merged 1 commit into
mainfrom
feat/cluster40

Conversation

@tannevaled

Copy link
Copy Markdown
Contributor
  • Hash#key(value) returns the first key whose value equals value (by
    ==), or nil.
  • Hash.ruby2_keywords_hash(hash) returns a copy of hash flagged (via a new
    Ruby2Keywords field) as a keyword hash for *args forwarding, leaving the
    original unflagged; Hash.ruby2_keywords_hash? reports that flag. Both
    raise wrong argument type X (expected Hash) for a non-Hash argument.

Verified against ruby 4.0.6. Whole-package coverage stays at 100%; the ruby/spec
ratchet floor rises 15810 → 15820 (core/hash key +3, ruby2_keywords_hash +5,
zero regressions in a deterministic per-file sweep).

🤖 Generated with Claude Code

- Hash#key(value) returns the first key whose value equals value (by ==), or nil.
- Hash.ruby2_keywords_hash(hash) returns a copy of hash flagged (via a new
  Ruby2Keywords field) as a keyword hash for *args forwarding, leaving the
  original unflagged; Hash.ruby2_keywords_hash? reports that flag. Both raise
  "wrong argument type X (expected Hash)" for a non-Hash argument.

Verified against ruby 4.0.6. Whole-package coverage stays at 100%; the ruby/spec
floor rises 15810 -> 15820 (core/hash key +3, ruby2_keywords_hash +5).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@tannevaled
tannevaled merged commit fc03024 into main Aug 27, 2026
7 checks passed
@tannevaled
tannevaled deleted the feat/cluster40 branch August 27, 2026 12:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant