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

mkmf.rb: files[0,1] == "." -> files[0,2] == "./"

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2318 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
ttate 2002-04-01 17:42:32 +00:00
parent 46a7493b6c
commit edf4c88f79

View file

@ -186,7 +186,7 @@ def install_files(mfile, ifiles, map = INSTALL_DIRS, srcprefix = nil)
ifiles.each do |files, dir, prefix| ifiles.each do |files, dir, prefix|
dir = map.inject(dir) {|dir, (orig, new)| dir.gsub(orig, new)} if map dir = map.inject(dir) {|dir, (orig, new)| dir.gsub(orig, new)} if map
prefix = %r"\A#{Regexp.quote(prefix)}/" if prefix prefix = %r"\A#{Regexp.quote(prefix)}/" if prefix
if( files[0,1] == "." ) if( files[0,2] == "./" )
# install files which are in current working directory. # install files which are in current working directory.
Dir.glob(files) do |f| Dir.glob(files) do |f|
d = File.dirname(f) d = File.dirname(f)