summaryrefslogtreecommitdiff
path: root/tool/vcs.rb
diff options
context:
space:
mode:
authorTakashi Kokubun <takashikkbn@gmail.com>2019-05-29 08:22:02 +0900
committerTakashi Kokubun <takashikkbn@gmail.com>2019-05-29 08:22:04 +0900
commit6b5e712361cca8559ed66d5c1106e888c5971d39 (patch)
tree24b421085784bcd8b1995f341a31616821c1fbd2 /tool/vcs.rb
parente1f62d7f0e33de81a194f26a2c57e14e38d9de52 (diff)
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.
Diffstat (limited to 'tool/vcs.rb')
-rw-r--r--tool/vcs.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/tool/vcs.rb b/tool/vcs.rb
index 34bafa7..ecb313d 100644
--- a/tool/vcs.rb
+++ b/tool/vcs.rb
@@ -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|