[pull] master from ruby:master#794
Merged
pull[bot] merged 22 commits intoturkdevops:masterfrom Feb 20, 2026
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 : )