mirror of
https://github.com/ruby/ruby.git
synced 2026-08-01 02:20:48 +08:00
Fix default gem detection for nested out-of-tree builds
The "# default:" marker records the source path relative to the build directory, but default_gem? re-prefixed it with srcdir, resolving a non-existent path and wrongly removing every default gemspec whenever srcdir is deeper than one level. The sibling layout used on CI (srcdir=../src) only canceled the double prefix by accident. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
249de200d5
commit
b52a02ccc2
Notes:
git
2026-06-29 08:26:12 +00:00
@ -101,7 +101,7 @@ class Removal
|
||||
(@defaults ||= {}).fetch(spec) do
|
||||
File.open(prefixed(spec)) do |f|
|
||||
if /^# default: (\S+) (\d+\.\d+)/ =~ f.gets("")
|
||||
File.mtime(prefixed($1)) <= Time.at(Rational($2))
|
||||
File.mtime($1) <= Time.at(Rational($2))
|
||||
else
|
||||
false
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user