[Bug #21400] Fix rb_bug() when killing current root fiber in non-main thread (#13526)

Fixes the following:

```ruby
Thread.new { Fiber.current.kill }.join
```
This commit is contained in:
Luke Gruber 2025-06-05 20:31:45 -04:00 committed by GitHub
parent 86eb5f9c05
commit 54ef6c312a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
Notes: git 2025-06-06 00:31:58 +00:00
Merged-By: ioquatix <samuel@codeotaku.com>
2 changed files with 9 additions and 0 deletions

View file

@ -37,3 +37,8 @@ assert_normal_exit %q{
assert_normal_exit %q{
Fiber.new(&Object.method(:class_eval)).resume("foo")
}, '[ruby-dev:34128]'
# [Bug #21400]
assert_normal_exit %q{
Thread.new { Fiber.current.kill }.join
}