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

fake.rb: fix builddir

* tool/fake.rb (prehook): consider the case building under the
  source directory.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52439 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2015-11-04 01:32:54 +00:00
parent 7995eb43cb
commit ecbbd23646

View file

@ -41,7 +41,7 @@ prehook = proc do |extmk|
dir.shift
pwd.shift
end
builddir = File.join([".."]*pwd.size + dir)
builddir = File.join((pwd.empty? ? ["."] : [".."]*pwd.size) + dir)
builddir = "." if builddir.empty?
end
join = proc {|*args| File.join(*args).sub!(/\A(?:\.\/)*/, '')}