Skip to content

Compare the missing-default sentinel by identity - #61

Open
OskarEichler wants to merge 2 commits into
ruby:masterfrom
OskarEichler:codex/fetch-default-identity
Open

Compare the missing-default sentinel by identity#61
OskarEichler wants to merge 2 commits into
ruby:masterfrom
OskarEichler:codex/fetch-default-identity

Conversation

@OskarEichler

Copy link
Copy Markdown

Summary

Compare the missing-default sentinel by identity, avoiding arbitrary equality methods on a caller-supplied default object.

Reproduction and verification

A default whose == always returns true is currently mistaken for PStore::Error and raises. Checked that object, the actual sentinel, nil, false, zero and string defaults.

  • External focused corpus: 6 verified on this isolated branch under rbenv Ruby 4.0.6.
  • Existing upstream RBENV_VERSION=4.0.6 rbenv exec rake test: 13 tests / 26 assertions, zero failures before and after.
  • All files and injected failures are confined to scratch storage; no production operations.
  • No repository tests added or modified under the contributor's task constraint. Other Ruby versions and native Windows were not executed locally.

Breaking-change notes and limitations

Caller defaults are returned as supplied unless they are the actual PStore::Error sentinel. No API removal.

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