Skip to content

Allow SystemCallError.new(errno) - #3185

Merged
ksss merged 2 commits into
ruby:masterfrom
hanazuki:SystemCallError.new
Sep 30, 2026
Merged

ksss merged 2 commits into
ruby:masterfrom
hanazuki:SystemCallError.new

Conversation

@hanazuki

@hanazuki hanazuki commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

MRI treats a single integer argument for SystemCallError.new as an errno. It also accepts a message without an errno and formats the optional func via to_s. Reflect these forms in the signature and allow errno to be nil.

MRI treats a single integer argument as an errno. It also accepts a
message without an errno and formats the optional func via to_s.
Reflect these forms in the signature and allow errno to be nil.

Assisted-by: Codex:gpt-6-sol
Replace the legacy StdlibTest case with an instance test. Check both
integer and nil results through the type assertion helper.

Assisted-by: Codex:gpt-6-sol

@ksss ksss left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@ksss
ksss added this pull request to the merge queue Sep 30, 2026
Merged via the queue into ruby:master with commit 3b7715b Sep 30, 2026
24 checks passed
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.

2 participants