Skip to content

Comments

[pull] master from ruby:master#794

Merged
pull[bot] merged 22 commits intoturkdevops:masterfrom
ruby:master
Feb 20, 2026
Merged

[pull] master from ruby:master#794
pull[bot] merged 22 commits intoturkdevops:masterfrom
ruby:master

Conversation

@pull
Copy link

@pull pull bot commented Feb 20, 2026

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 : )

tekknolagi and others added 22 commits February 19, 2026 16:05
Also report it as a percentage of overall compile time.
The embedded-to-heap path copied RSTRING_LEN(str) bytes into an
ALLOC_N buffer, missing the null terminator (and any slot padding).
Copy str_embed_capa(str) bytes instead. Always safe since we only
enter this path when str_embed_capa(str) < capacity + termlen.
This was useful when there was only a single size pool to have an easy
way of referencing the average number of objects a page could hold (this
would vary by a few in real terms because of page alignment).

But with multiple heaps, each heap contains pages with different numbers
of objects because slot sizes are different.

So when we use HEAP_PAGE_OBJ_LIMIT to do any kind of calculations: such
as calculating freeable pages), then we're significantly underestimating
the number of freeable pages in the larger size pools, which will cause
us to hold on to pages unnecessarily.

This commit replaces uses of HEAP_PAGE_OBJ_LIMIT with a more accurate
approximation for the actual heap being manipulated.

It also removes HEAP_PAGE_OBJ_LIMIT from GC::INTERNAL_CONSTANTS
This replaces GC-based buffer guards (rb_imemo_tmpbuf,
TypedData_Wrap_Struct) with rb_ensure to clean up malloc/xmalloc memory
when an exception occurs.
IO::Buffer#locked: Release lock even when the block raises/breaks

Previously, `IO::Buffer#locked` leaks the lock when the block raises
an exception, or breaks.

Fixes: [Bug #21882]
- ### Problem

  When Bundler installs gems, it checks whether a gem plugin needs
  to be installed.
  This check (`Dir.glob`) is expensive and is hotspot when profiling
  Bundler.

  ### Details

  Bundler makes a check to see if a gemspec stub exists for the gem
  being installed. If a gemspec stub already exists and its version is
  the same as the gem being installed, then Bundler assumes that the
  gem plugin was already generated in the past and there is no need to
  generate it again.
  This check was added for performance purpose but it's counter
  productive and has the opposite effect.

  The vast majority of gems don't have a plugin and we are incurring
  the cost of doing a `Dir.glob` for *every* gems to account for the
  small percentage of gems that may have a plugin to install.

  So it's actually much faster to always reinstall plugins for the few
  gems that have ones, than to make a check for all gems.

  Another advantage with this change is that if someone accidentaly
  bust the `plugins` folder but don't bust the `specifications` one,
  then Bundler will correctly regenerate plugins (where as before it
  wouldn't).

  I tried running this patch on a Gemfile containing 400 gems and this
  patch shoves around a second.

  ### Solution

  Always install plugins, no matter if one of the same version already
  exist.

ruby/rubygems@d8d21c7a40
It's code but not formatted as such
Because win32-registry needs fiddle and fiddle is a bundled gem.

[Bug #21855]
Instead of using %{} which works like double-quoted string and allows
escape sequences and in which "other escaped characters (a backslash
followed by a character) are interpreted as the character", change the
examples for `allow_invalid_escape` to use single-quotes strings, in
which "any other character following a backslash [except ' and \] is
interpreted as is: a backslash and the character itself."

This makes it clearer the JSON document only includes a single
backslash.

ruby/json@a888d6d57b
@pull pull bot locked and limited conversation to collaborators Feb 20, 2026
@pull pull bot added the ⤵️ pull label Feb 20, 2026
@pull pull bot merged commit ee2d902 into turkdevops:master Feb 20, 2026
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.