File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -1075,8 +1075,14 @@ def obj.foo2; yield; end
10751075 it "default $LOAD_PATH entries until sitelibdir included have @gem_prelude_index set" do
10761076 skip "no sense in ruby itself" if MSpecScript . instance_variable_defined? ( :@testing_ruby )
10771077
1078- $:. should . include? ( RbConfig ::CONFIG [ 'sitelibdir' ] )
1079- idx = $:. index ( RbConfig ::CONFIG [ 'sitelibdir' ] )
1078+ if platform_is :windows
1079+ # See https://github.com/ruby/setup-ruby/pull/762#issuecomment-2917460440
1080+ $:. should . include? { |e | File . realdirpath ( e ) == RbConfig ::CONFIG [ 'sitelibdir' ] }
1081+ idx = $:. index { |e | File . realdirpath ( e ) == RbConfig ::CONFIG [ 'sitelibdir' ] }
1082+ else
1083+ $:. should . include? ( RbConfig ::CONFIG [ 'sitelibdir' ] )
1084+ idx = $:. index ( RbConfig ::CONFIG [ 'sitelibdir' ] )
1085+ end
10801086
10811087 $:[ idx ..-1 ] . all? { |p | p . instance_variable_defined? ( :@gem_prelude_index ) } . should be_true
10821088 $:[ 0 ...idx ] . all? { |p | !p . instance_variable_defined? ( :@gem_prelude_index ) } . should be_true
You can’t perform that action at this time.
0 commit comments