Skip to content

[pull] master from ruby:master - #1426

Merged
pull[bot] merged 6 commits into
turkdevops:masterfrom
ruby:master
Sep 19, 2026
Merged

pull[bot] merged 6 commits into
turkdevops:masterfrom
ruby:master

Conversation

@pull

@pull pull Bot commented Sep 19, 2026

Copy link
Copy Markdown

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

nobu and others added 6 commits September 19, 2026 18:46
`rb_freeze_singleton_class` is an implementation detail of
`RB_OBJ_FREEZE`, so deprecate direct calls from extension libraries
before removing its public declaration in Ruby 4.2.
Avoid calling `rb_obj_freeze_inline` for already frozen objects,
including immediate values, to match `rb_obj_freeze` semantics.
The frozen check in `OBJ_FREEZE` makes the separate check redundant,
and immediate values are always frozen, so the old assertion is
unreachable.
The selector conversion may run aribtrary Ruby code and modify the source
string. This can cause a use-after-free if it resizes the source string.
For example, the following script causes corruption:

    s = "-" * 1000 + "abc" + "-" * 1000
    obj = Object.new
    obj.define_singleton_method(:to_str) do
      s.clear
      "-"
    end
    p s.strip(obj)
@pull pull Bot locked and limited conversation to collaborators Sep 19, 2026
@pull pull Bot added the ⤵️ pull label Sep 19, 2026
@pull
pull Bot merged commit 44874b7 into turkdevops:master Sep 19, 2026
0 of 2 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants