mirror of
https://github.com/ruby/ruby.git
synced 2026-08-03 11:18:06 +08:00
[ruby/rubygems] Default RGV to "." and add switch_rubygems to bin/rspec
With spec/ at the repo root, rspec auto-adds lib/ to $LOAD_PATH, which now points to the repo's rubygems lib instead of bundler's lib. This causes a conflict between system and local rubygems. Adding switch_rubygems ensures a clean local rubygems load from the start. Also default RGV to "." so no environment variables are needed to run bin/rspec or bin/parallel_rspec. https://github.com/ruby/rubygems/commit/b4774e3aab Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
e2696ded47
commit
a0093092fc
Notes:
git
2026-03-23 08:25:52 +00:00
@ -1,6 +1,7 @@
|
||||
#!/usr/bin/env ruby
|
||||
# frozen_string_literal: true
|
||||
|
||||
require_relative "../bundler/support/switch_rubygems"
|
||||
require_relative "../bundler/support/rubygems_ext"
|
||||
|
||||
Spec::Rubygems.gem_load("rspec-core", "rspec")
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require_relative "rubygems_version_manager"
|
||||
ENV["RGV"] ||= "."
|
||||
RubygemsVersionManager.new(ENV["RGV"]).switch
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user