ruby-changes:66854
From: Nobuyoshi <ko1@a...>
Date: Wed, 21 Jul 2021 20:45:05 +0900 (JST)
Subject: [ruby-changes:66854] c25cf1eaaa (master): Drop optional commit hash when updated
https://git.ruby-lang.org/ruby.git/commit/?id=c25cf1eaaa From c25cf1eaaa886aaf510ebe92961daab716a6faef Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Wed, 21 Jul 2021 20:44:13 +0900 Subject: Drop optional commit hash when updated --- tool/update-bundled_gems.rb | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) mode change 100644 => 100755 tool/update-bundled_gems.rb diff --git a/tool/update-bundled_gems.rb b/tool/update-bundled_gems.rb old mode 100644 new mode 100755 index cef31e2..48dcaa9 --- a/tool/update-bundled_gems.rb +++ b/tool/update-bundled_gems.rb @@ -9,6 +9,12 @@ unless /^[^#]/ !~ (gem = $F[0]) https://github.com/ruby/ruby/blob/trunk/tool/update-bundled_gems.rb#L9 gem = src.fetch_spec(gem) uri = gem.metadata["source_code_uri"] || gem.homepage uri = uri.sub(%r[\Ahttps://github\.com/[^/]+/[^/]+\K/tree/.*], "").chomp(".git") - $F[3][$F[1]] = gem.version.to_s if $F[3] && $F[3].include?($F[1]) + if $F[3] + if $F[3].include?($F[1]) + $F[3][$F[1]] = gem.version.to_s + elsif $F[2] != gem.version and /\A\h+\z/ =~ $F[3] + $F[3..-1] = [] + end + end $_ = [gem.name, gem.version, uri, *$F[3..-1]].join(" ") end -- cgit v1.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/