Applied in changeset commit:git|ea3cd7efe1f6bab78572b31774462e891ef01243. ---------- Fix reuse of MatchData assigned to $~ $~ = m = /a/.match("a").dup /b/ =~ "b" p m [Bug #22381]jhawthorn (John Hawthorn)
```ruby m = /a/.match("a").dup # dup a MatchData (has no "busy" flag set) $~ = m # assign to $~ /b/ =~ "b" # perform a match that sets $~ p m # "b" on Ruby 4.0 (and 1.8-2.7, incorrect) # "a" on Ruby 3.0-3.4 (correct) ``` This i...jhawthorn (John Hawthorn)
Uninitialized classes, created by `Class.allocate`, are a recurring source of bugs (most recently #22341). Every place that inspects a class's superclass chain has to check whether the class has been initialized, and it's easy to forget ...jhawthorn (John Hawthorn)
Great catch! This is my mistake from https://github.com/ruby/ruby/commit/e01e89f55c82be8db5d8ccbf305ee38e3769e582 It should be safe to remove that assertion, but I also think it should probably be forbidden to include on an uninitiali...jhawthorn (John Hawthorn)
Previously the courier only carried the core types natively, and any other object made the whole message fall back to Marshal.dump on the sender and Marshal.load on the receiver. That serialized everything reachable into bytes, so a Ract...jhawthorn (John Hawthorn)
For some types (probably most notably Set), Marshal loading is defined with compatibility functions. We should use those when set.jhawthorn (John Hawthorn)
The previous commit integrated Marshal's hooks into the native courier copying path. That should cover most cases. One exception I've noticed that this doesn't implement is singleton classes which have been extended by modules. I would ...jhawthorn (John Hawthorn)
Previously the Ractor courier rejected singleton class objects. However we have existing tests of OpenStruct that those objects can be Ractor-copied. dup and clone, which were used prior to RLGC's merge, also just ignore singleton class...jhawthorn (John Hawthorn)