summaryrefslogtreecommitdiff
path: root/tool
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2023-08-30 15:00:00 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2023-08-30 15:00:00 +0900
commitacedbcb1b4eb6b362f11e783bff53c237d05afc6 (patch)
tree3e670b83fdd03eac92b0e833c4717c0c9067b115 /tool
parentc05737e09f1809715a672148258dd225cede331f (diff)
sync_default_gems.rb: Fix typo in replace_rdoc_ref_all
Diffstat (limited to 'tool')
-rwxr-xr-xtool/sync_default_gems.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/tool/sync_default_gems.rb b/tool/sync_default_gems.rb
index ec70b86752..4c3f5a6422 100755
--- a/tool/sync_default_gems.rb
+++ b/tool/sync_default_gems.rb
@@ -122,9 +122,10 @@ module SyncDefaultGems
end
def replace_rdoc_ref_all
- result = pipe_readlines(%W"git status porcelain -z -- *.c *.rb *.rdoc")
+ result = pipe_readlines(%W"git status --porcelain -z -- *.c *.rb *.rdoc")
result.map! {|line| line[/\A.M (.*)/, 1]}
result.compact!
+ return if result.empty?
result = pipe_readlines(%W"git grep -z -l -F [https://docs.ruby-lang.org/en/master/ --" + result)
result.inject(false) {|changed, file| changed | replace_rdoc_ref(file)}
end