summaryrefslogtreecommitdiff
path: root/tool/downloader.rb
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2022-12-03 01:37:46 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2022-12-03 02:03:23 +0900
commitc2671fa0513c49c874810677f347d727c4ed4502 (patch)
tree0c9243595c974b907bb223f8326093a2efbe919c /tool/downloader.rb
parenteb2b717a8bfc18f8ee53ff3d738bcfd3960f8fa4 (diff)
downloadruby-c2671fa0513c49c874810677f347d727c4ed4502.tar.gz
downloader.rb: Select less components path
Diffstat (limited to 'tool/downloader.rb')
-rw-r--r--tool/downloader.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/tool/downloader.rb b/tool/downloader.rb
index 59225ecfbd..0bcd8f31c3 100644
--- a/tool/downloader.rb
+++ b/tool/downloader.rb
@@ -317,7 +317,7 @@ class Downloader
rescue ArgumentError
abs = cache.expand_path
link = abs.relative_path_from(file.parent.expand_path)
- if link.to_s.size > abs.to_s.size
+ if link.to_s.count("/") > abs.to_s.count("/")
link = abs
end
end