1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Suppress uninitialized instance variable warnings [ci skip]

This commit is contained in:
Nobuyoshi Nakada 2019-08-30 11:18:23 +09:00
parent 55f496c89b
commit e593d5b31a
No known key found for this signature in database
GPG key ID: 4BC7D6DF58D8DF60

View file

@ -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)