Skip to content

fix: locate the maps registry yaml under rubygems 4 - #831

Merged
ronaldtse merged 3 commits into
mainfrom
fix/rubygems4-map-gems
Nov 5, 2026
Merged

ronaldtse merged 3 commits into
mainfrom
fix/rubygems4-map-gems

Conversation

@ronaldtse

Copy link
Copy Markdown
Contributor

Gem.find_latest_files raises on rubygems 4 (StubSpecification#files removed), which made map_gems - and therefore every transliterate call - fail before any map could load on modern rubygems installs. Keeps the rubygems-3 fast path, adds a precise fallback (glob the interscript-maps gems), and adds spec coverage for both paths. Verified on a rubygems-4.0.23 machine in stub-only index state.

rubygems 4 removed StubSpecification#files, which Gem.find_latest_files
relies on - on rubygems-4 installs every Interscript.transliterate call
raised from map_gems before any map could load. The fast path is kept
for rubygems 3 and wrapped: when it raises (or comes back empty), the
fallback globs the interscript-maps gems directly (one or two gems,
cheap). Verified on a rubygems-4.0.23 install where the gem index is
in stub-only state: map resolution and transliteration work without any
workaround; rubygems-3 behavior unchanged (fast path intact).
@ronaldtse
ronaldtse merged commit 9971101 into main Nov 5, 2026
12 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant