Updated control flow type definitions #1444
Merged
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.
Update
Kernel
"control flow" method definitions:catch
: (nothing to do)throw
: make the taguntyped
at_exit
: block return type isvoid
exit
andexit!
: usebool
instead ofTrueClass | FalseClass
; Also, useint
instead ofInteger
for statusfork
: block return type isvoid
, return type in block form is no longerInteger?
but justInteger
loop
: block return type isvoid
sleep
: Add in support for Ruby-3.3.0 preview'ssleep(nil)
raise
/fail
: Add support forraise has_a_to_str_method
, Made themessage
in the long-form_ToS
, and allow fornil
andString
backtraces.Technically, the
message
in the long form can be any type, as long as the first argument'sexception
function allows for it. So, we could do[T] (_Exception[T], ?T?, ...
, but that seems like overkill. (Especially since_Exception
is used inThread
andFiber
. Maybe when I get around to I could change the signature?)