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

Make tool/vcs.rb compliant to BASERUBY

People seem to consider BASERUBY is either 1.8 or 1.9 now. Since this
file may be executed by BASERUBY from file2lastrev.rb, I think we should
not rely on Ruby 2.0 in this file for now.
This commit is contained in:
Takashi Kokubun 2019-05-29 08:22:02 +09:00
parent e1f62d7f0e
commit 6b5e712361
No known key found for this signature in database
GPG key ID: 6FFC433B12EE23DD

View file

@ -124,7 +124,8 @@ class VCS
@@dirs << [dir, self, pred]
end
def self.detect(path, uplevel_limit: 0)
def self.detect(path, options = {})
uplevel_limit = options.fetch(:uplevel_limit, 0)
curr = path
begin
@@dirs.each do |dir, klass, pred|