Add stdlib signature tests for #2967#2989
Open
ksss wants to merge 1 commit into
Open
Conversation
PR ruby#2967 で更新された core/stdlib の signature に対する runtime signature test を追加する。 - IO#pathconf — pipe + Etc::PC_PIPE_BUF で検証 - StringIO singleton: open (non-block / block 両形) - StringIO instance: pread, read_nonblock, write_nonblock, sysread, ungetc, fcntl (NotImplementedError), fsync, internal_encoding, external_encoding, set_encoding_by_bom - Etc::Group.each / Etc::Passwd.each の block + Enumerator overload - Etc::Passwd の age/comment/quota (member 存在で guard) read_nonblock / write_nonblock の `exception:` キーワードは true/false のリテラルに展開して assertion を分けた。 `exception: false` は empty 入力で nil を返す分岐があるため。 Digest::Class の変更は raap で別途検証されているため test/stdlib/digest には手を入れていない。 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add runtime signature tests for the core/stdlib signature corrections in #2967.
Coverage
IO#pathconfStringIO.open(non-block form added in Correct core/stdlib signatures to match Ruby 4.0 #2967),StringIO#pread,read_nonblock(withexception:literal split),write_nonblock,sysread,ungetc(String / Integer),fcntl(always raisesNotImplementedError),fsync,internal_encoding,external_encoding,set_encoding_by_bomEtc::Group.each/Etc::Passwd.eachblock & Enumerator overloadsEtc::Passwd#age/comment/quotagetters & setters (skipped on platforms where the member is absent)Not covered (intentional)
Etc.sysconf/Etc.systmpdirnil branch — not reachable in the test environment, but the existing non-nil cases conform to the widenedInteger?/String?signatureStringIO#external_encodingnil branch — same reasonDigest::Classchanges — covered by raap, not by hand-written runtime testsGenerated with Claude Code