Skip to content

Raise TypeError in system when the fiber scheduler's process_wait returns nil - #9843

Open
sampokuokkanen wants to merge 1 commit into
jruby:masterfrom
sampokuokkanen:system-nil-process-wait
Open

sampokuokkanen wants to merge 1 commit into
jruby:masterfrom
sampokuokkanen:system-nil-process-wait

Conversation

@sampokuokkanen

Copy link
Copy Markdown
Contributor

When the fiber scheduler's process_wait returned nil, Kernel#system cast the missing exit status to Process::Status and failed with a Java ClassCastException. MRI's rb_f_system checks the type and raises TypeError.

typeError(context, nil, ...) would say NilClass so the message is spelled out.

…urns nil

When the fiber scheduler's process_wait returned nil, Kernel#system cast
the missing exit status to Process::Status and failed with a Java
ClassCastException. MRI's rb_f_system checks the type and raises
TypeError, so do the same.
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