Skip to content

[pull] master from ruby:master#998

Merged
pull[bot] merged 2 commits into
turkdevops:masterfrom
ruby:master
May 10, 2026
Merged

[pull] master from ruby:master#998
pull[bot] merged 2 commits into
turkdevops:masterfrom
ruby:master

Conversation

@pull
Copy link
Copy Markdown

@pull pull Bot commented May 10, 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 : )

tagomoris added 2 commits May 10, 2026 09:38
builtin_lookup() find the pre-loaded and compiled (to ISeq) builtin libraries.
The libraries (.rb files) are loaded by miniruby, and those ISeq are written
in build/builtin_library.rbbin in the order that miniruby loads.

The fastpath of builtin_lookup() searches the contents of builtin_library.rbbin
in the order of miniruby loading, on ruby. The only fastpath works as far as
the order of loading libraries in ruby is equal to miniruby.
This is the reason why the slowpath's bug has not caused problems.

The slowpath incremented `bb` twice in a loop, so it's clearly bug
to skip the item after checking bb. Items at 1, 3, 5... will never be found
in the swlopath.
This change separates the master box from the root box, as the single
master copy of boxes.
Before this change, the root box is the source of copies, and also
it runs builtin classes' code. Builtin code makes changes by
requiring files, thus the source of copies is mutable, be different
from the past one. This causes different internal states of boxes,
depending on when it is created.
After this change, all boxes are created from the master box, and
the master box never runs code, so it realizes the immutable source
of copies.

This also makes is possible to separate RubyGems (and other default
gems) from each boxes. All boxes will have their own copies of RubyGems.
RubyGems has its internal state, but it'll be separated between boxes
after this change.
@pull pull Bot locked and limited conversation to collaborators May 10, 2026
@pull pull Bot added the ⤵️ pull label May 10, 2026
@pull pull Bot merged commit 276f0d9 into turkdevops:master May 10, 2026
1 of 4 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.

1 participant