Active Record generate methods during boot time based on the database schema. However before defining every one of these methods it first check if it already exists, regardless of visibility, as to avoid overwriting use defined code. ...byroot (Jean Boussier)
The fast path is now 4.4x faster, now making it ~2.6x times faster than `CGI.escape_html`, and 26x faster than an equivalent `gsub`. ``` compare-ruby: ruby 4.1.0dev (2026-09-06T11:22:48Z master 13fc4ffd32) +YJIT +PRISM [arm64-darwin25] ...byroot (Jean Boussier)
Alright, I can reproduce now, but I don't think the proposed patch make sense, as it almost always reserves and extra member, at that point we might as well backport 6f339aebfe9b233304ea98f53274a48f614e7aea, it's simpler and cleaner (not...byroot (Jean Boussier)
The code on master was a forgotten leftover from a recent change I just removed it. On 4.0, it's a bit weird, I can indeed reproduce on 4.0.6, but I'm failing to reproduce on the `ruby_4_0` branch, not yet clear why.byroot (Jean Boussier)
Applied in changeset commit:git|2f72b3d142f4b66c3dfba4a7b49aaa101f9780cd. ---------- struct.c: Strop reserving extra space for ivars [Bug #22292] This was a leftover 6f339aebfe9b233304ea98f53274a48f614e7aeabyroot (Jean Boussier)
[Bug #22290] Otherwise any code defining instance variables on `::Object` (including `main`) will bloat all classes defined afterwards.byroot (Jean Boussier)