[pull] master from ruby:master#1150
Merged
Merged
Conversation
When the same Gem::URI copy is shipped in two gems (RubyGems and Bundler) and required from different paths, RubyGems' unguarded require_relative reloads it and emits "already initialized constant" warnings. Add an idempotent guard at the top of the vendored uri.rb so a second load from any path short-circuits. This prepares Bundler to reuse RubyGems' copy. ruby/rubygems@a73d0e282e Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Add lib/rubygems/vendor/uri to the gem's files so Bundler carries the Gem::URI copy itself. This keeps Bundler self-contained on RubyGems versions older than 3.5, which do not vendor URI, independently of any release cutoff. ruby/rubygems@268b317b9c Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Drop Bundler's duplicate vendored URI copy and load Gem::URI from RubyGems' copy instead, which the gem now ships under lib/rubygems. The shim skips loading when Gem::URI is already defined and falls back to the stdlib only when no vendored copy can be required at all. ruby/rubygems@e03d77a78c Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The Bundler gem now ships lib/rubygems/vendor/uri, so include it in tracked_files_glob to keep the "ships the correct set of files" spec in sync with the gemspec. ruby/rubygems@d159cabc72 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
It's causing ruby CI to flake, because it's a badly designed test, a lot of thing can cause acouple extra allocation there and there so even if you invoke the exact same code twice, you might still allocate a bit more or a bit less.
…utating candidates The locked platform set is a property of the candidates being materialized together, so compute it in Materialization and thread it through to candidate_platforms rather than writing it back onto each shared LazySpecification from the constructor. This drops the respond_to?(:locked_platforms=) guard and the now-unused accessor. ruby/rubygems@f6fe69903e Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…stall errors When a platform-specific variant is the only thing locked and it is incompatible with the current Ruby, frozen mode fails at install time with no hint about the fix. Point users at re-resolving outside frozen mode, which adds the ruby variant to the lockfile as a fallback. ruby/rubygems@7ad8850e47 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Keeps the locked platform argument keyworded along the whole resolve_best_platform path instead of switching to a positional at the last hop. ruby/rubygems@1d5f35ad0e Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
… variants When the only locked variant is already the ruby one, the install error should not point at a ruby fallback that doesn't exist. Guards the early return in incompatibility_message against regressions. ruby/rubygems@58bb74c7ba Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ror for def/lambda/block args
ErrorHighlight.spot defaults point_type to :args for ArgumentError. When an
ArgumentError originates from argument binding (e.g. a missing required
keyword), its first backtrace location maps to a def/lambda/block node. The
spotter had no implementation for the :args point type on those nodes and did
`raise NotImplementedError`.
This is a regression from 0.7.0 (and in Ruby 4.0 compared to Ruby 3.4).
ErrorHighlight.spot only rescues SyntaxError/SystemCallError/ArgumentError, and
NotImplementedError is not a StandardError, so it escaped through
CoreExt#generate_snippet -> Exception#detailed_message / #full_message and
replaced the original exception. This is normally hidden because the VM's
"missing keyword" message matches the keyword regex in generate_snippet and
takes the safe :name branch, but it surfaces as soon as the ArgumentError is
re-raised/wrapped with a custom message that falls into the :args else branch.
Return nil (the documented "no spot" result) for these cases instead, matching
the graceful-degradation behavior of the surrounding feature. The fix is
applied consistently across both compilers:
- prism: def_node / lambda_node / block_node
- parse.y: DEFN / DEFS (raised NotImplementedError) and LAMBDA / ITER
(silently returned a spot for :args, inconsistent with prism)
All of these branches were introduced together by the experimental "wrong
number of arguments" snippet feature and are only intended for point_type
:name, so returning nil for any other point_type keeps the two parsers in sync.
ruby/error_highlight@ca126db2db
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 : )