From: shyouhei@... Date: 2020-12-04T01:48:13+00:00 Subject: [ruby-core:101235] [Ruby master Bug#17360] Objects disappear from ObjectSpace after using Ractor Issue #17360 has been updated by shyouhei (Shyouhei Urabe). Status changed from Open to Rejected Yes this is an intentional behaviour as of 3.0. Currently Ractor and ObjectSpace do not interface well. You cannot mix them now. ---------------------------------------- Bug #17360: Objects disappear from ObjectSpace after using Ractor https://bugs.ruby-lang.org/issues/17360#change-88915 * Author: Dan0042 (Daniel DeLorme) * Status: Rejected * Priority: Normal * Backport: 2.5: UNKNOWN, 2.6: UNKNOWN, 2.7: UNKNOWN ---------------------------------------- Test: ```ruby GC.disable STR = -"testing 123" x = STR.dup puts "before:" ObjectSpace.each_object(String){ |s| puts s.object_id if s == STR } Ractor.new{ }.take puts "after:" ObjectSpace.each_object(String){ |s| puts s.object_id if s == STR } ``` Result: ``` before: 60 80 100 <internal:ractor>:38: warning: Ractor is experimental, and the behavior may change in future versions of Ruby! Also there are many implementation issues. after: 80 ``` Expected result: Same object ids should be printed before and after (BTW why 3 strings with the same value? shouldn't it be 2?) -- https://bugs.ruby-lang.org/ Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe> <http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>