From: "yahonda (Yasuo Honda) via ruby-core" Date: 2026-08-27T02:01:21+00:00 Subject: [ruby-core:126510] [Ruby Bug#22173] `Ractor.new { Fiber.current }.value` raises `[BUG] rb_ractor_confirm_belonging object-ractor id:1, current-ractor id:2` Issue #22173 has been updated by yahonda (Yasuo Honda). This assertion failure does not reproduce since https://github.com/ruby/ruby/commit/09aab7899fa0d0014e458c319e689175881a2075 so I think we can close it. ---------------------------------------- Bug #22173: `Ractor.new { Fiber.current }.value` raises `[BUG] rb_ractor_confirm_belonging object-ractor id:1, current-ractor id:2` https://bugs.ruby-lang.org/issues/22173#change-118670 * Author: yahonda (Yasuo Honda) * Status: Open * Assignee: ractor * ruby -v: ruby 4.1.0dev (2026-07-02T09:24:35Z master 7c69f93d53) +PRISM [x86_64-linux] * Backport: 3.3: UNKNOWN, 3.4: UNKNOWN, 4.0: UNKNOWN ---------------------------------------- This issue is originally found at https://github.com/rails/rails/issues/57954 ### Steps to reproduce 1. Build ruby with `-DRUBY_DEBUG=1` enabled like ``` #!/bin/bash cd ${HOME}/src/github.com/ruby/ruby make clean make distclean make realclean ./autogen.sh ./configure --prefix="${HOME}/.local/share/mise/installs/ruby/trunk" cppflags="-DENABLE_PATH_CHECK=0 -DRUBY_DEBUG=1" optflags="-O3 -fno-inline" --disable-install-doc make -j"$(getconf _NPROCESSORS_ONLN)" make install ``` 2. Run these one liners ``` ruby -ve 'Ractor.new { Fiber.current }.value' ``` ``` ruby -ve 'Fiber[:x] = Object.new; Ractor.new { Fiber[:x].class }.value' ``` ### Expected behavior Both of one liners should pass: ``` $ ruby -ve 'Ractor.new { Fiber.current }.value' ruby 4.1.0dev (2026-07-02T09:24:35Z master 7c69f93d53) +PRISM [x86_64-linux] -e:1: warning: Ractor API is experimental and may change in future versions of Ruby. $ ruby -ve 'Fiber[:x] = Object.new; Ractor.new { Fiber[:x].class }.value' ruby 4.1.0dev (2026-07-02T09:24:35Z master 7c69f93d53) +PRISM [x86_64-linux] -e:1: warning: Ractor API is experimental and may change in future versions of Ruby. ``` ### Actual behavior Both of them raise the `[BUG] rb_ractor_confirm_belonging object-ractor id:1, current-ractor id:2` assertion failures added through https://github.com/ruby/ruby/commit/af2471365fe ``` $ ruby -ve 'Ractor.new { Fiber.current }.value' ruby 4.1.0dev (2026-07-02T09:24:35Z master 7c69f93d53) +PRISM [x86_64-linux] -e:1: warning: Ractor API is experimental and may change in future versions of Ruby. 0x000078fa403213d0 fiber/Fiber -e:1: [BUG] rb_ractor_confirm_belonging object-ractor id:1, current-ractor id:2 ruby 4.1.0dev (2026-07-02T09:24:35Z master 7c69f93d53) +PRISM [x86_64-linux] ... ``` ``` $ ruby -ve 'Fiber[:x] = Object.new; Ractor.new { Fiber[:x].class }.value' ruby 4.1.0dev (2026-07-02T09:24:35Z master 7c69f93d53) +PRISM [x86_64-linux] -e:1: warning: Ractor API is experimental and may change in future versions of Ruby. 0x00007e56dbe9dfa8 T_OBJECT/Object len:0 capa:2 ptr:0x00007e56dbe9dfb8 -e:1: [BUG] rb_ractor_confirm_belonging object-ractor id:1, current-ractor id:2 ruby 4.1.0dev (2026-07-02T09:24:35Z master 7c69f93d53) +PRISM [x86_64-linux] ``` ---Files-------------------------------- 1.out (23.8 KB) 2.out (23.8 KB) -- https://bugs.ruby-lang.org/ ______________________________________________ ruby-core mailing list -- ruby-core@ml.ruby-lang.org To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org ruby-core info -- https://ml.ruby-lang.org/mailman3/lists/ruby-core.ml.ruby-lang.org/