summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean Boussier <[email protected]>2024-11-05 09:11:33 +0100
committerJean Boussier <[email protected]>2024-11-05 12:19:55 +0100
commit1cb9f9af23538b26e31fa1b3ffd432549af70671 (patch)
tree2964704bfcbd12c6456dca976cf7ab53c0286822
parent6c5a808b865906bc6baa2593e4f0b438af3f01cf (diff)
tool/sync_default_gems.rb: update json rules
`lib/json/ext/generator/state.rb` should actually be `ext/json/lib/json/ext/generator/state.rb`
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/11999
-rwxr-xr-xtool/sync_default_gems.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/tool/sync_default_gems.rb b/tool/sync_default_gems.rb
index b3b2652be3..f1e09f5f2f 100755
--- a/tool/sync_default_gems.rb
+++ b/tool/sync_default_gems.rb
@@ -190,13 +190,15 @@ module SyncDefaultGems
cp_r("#{upstream}/man/irb.1", "man/irb.1")
cp_r("#{upstream}/doc/irb", "doc")
when "json"
- rm_rf(%w[ext/json test/json])
+ rm_rf(%w[ext/json lib/json test/json])
cp_r("#{upstream}/ext/json/ext", "ext/json")
cp_r("#{upstream}/test/json", "test/json")
rm_rf("test/json/lib")
cp_r("#{upstream}/lib", "ext/json")
cp_r("#{upstream}/json.gemspec", "ext/json")
- rm_rf(%w[ext/json/lib/json/ext ext/json/lib/json/pure.rb ext/json/lib/json/pure])
+ rm_rf(%w[ext/json/lib/json/pure.rb ext/json/lib/json/pure])
+ json_files = Dir.glob("ext/json/lib/json/ext/**/*", File::FNM_DOTMATCH).select { |f| File.file?(f) }
+ rm_rf(json_files - Dir.glob("ext/json/lib/json/ext/**/*.rb"))
`git checkout ext/json/extconf.rb ext/json/parser/prereq.mk ext/json/generator/depend ext/json/parser/depend ext/json/depend benchmark/`
when "psych"
rm_rf(%w[ext/psych test/psych])