summaryrefslogtreecommitdiff
path: root/tool/fake.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-11-04 01:32:54 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-11-04 01:32:54 +0000
commitecbbd23646d2321e3e837aa7ac69582bbcd94190 (patch)
tree0fc80e066d2ab6d9e66d980a9dccf9edddf1238c /tool/fake.rb
parent7995eb43cbf3ae9f9a6bd0e6f925a1e9e9163c12 (diff)
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
Diffstat (limited to 'tool/fake.rb')
-rw-r--r--tool/fake.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/tool/fake.rb b/tool/fake.rb
index b2bdd08..9fe95a5 100644
--- a/tool/fake.rb
+++ b/tool/fake.rb
@@ -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(?:\.\/)*/, '')}