aboutsummaryrefslogtreecommitdiffstats
path: root/tool
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2019-08-30 11:18:23 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2019-08-30 11:23:21 +0900
commite593d5b31a13c59f9af07a2a6012c09bae7477d1 (patch)
treec157bd1270499632c6e0efab3f257a93818a2063 /tool
parent55f496c89b820f57d9e07c744675da8c43d6aa46 (diff)
downloadruby-e593d5b31a13c59f9af07a2a6012c09bae7477d1.tar.gz
Suppress uninitialized instance variable warnings [ci skip]
Diffstat (limited to 'tool')
-rw-r--r--tool/lib/vcs.rb6
1 files changed, 2 insertions, 4 deletions
diff --git a/tool/lib/vcs.rb b/tool/lib/vcs.rb
index e38db077b5..ca5c47190a 100644
--- a/tool/lib/vcs.rb
+++ b/tool/lib/vcs.rb
@@ -305,20 +305,18 @@ class VCS
end
def url
- unless @url
+ @url ||= begin
url = get_info[/<root>(.*)<\/root>/, 1]
@url = URI.parse(url+"/") if url
end
- @url
end
def wcroot
- unless @wcroot
+ @wcroot ||= begin
info = get_info
@wcroot = info[/<wcroot-abspath>(.*)<\/wcroot-abspath>/, 1]
@wcroot ||= self.class.search_root(@srcdir)
end
- @wcroot
end
def branch(name)