From 3e7de9238bd816ccd96b5ec28f3ff3667b2c6f88 Mon Sep 17 00:00:00 2001 From: eban Date: Fri, 22 Sep 2000 01:02:44 +0000 Subject: eban git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@956 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 3 ++- lib/mkmf.rb | 12 +++++++----- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 39abcd6f2..cbdcb852e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,7 @@ Thu Sep 21 19:04:34 2000 WATANABE Hirofumi - * ext/extmk.rb (install_rb): check whether libdir is directory or not. + * ext/extmk.rb, lib/mkmf.rb (install_rb): check whether libdir is + directory or not. Thu Sep 21 17:23:05 2000 Yukihiro Matsumoto diff --git a/lib/mkmf.rb b/lib/mkmf.rb index 47abd321b..37e06a3a1 100644 --- a/lib/mkmf.rb +++ b/lib/mkmf.rb @@ -129,11 +129,13 @@ def install_rb(mfile, dest, srcdir = nil) libdir = srcdir + "/" + libdir if srcdir path = [] dir = [] - Find.find(libdir) do |f| - next unless /\.rb$/ =~ f - f = f[libdir.length+1..-1] - path.push f - dir |= File.dirname(f) + if File.directory? libdir + Find.find(libdir) do |f| + next unless /\.rb$/ =~ f + f = f[libdir.length+1..-1] + path.push f + dir |= File.dirname(f) + end end for f in dir next if f == "." -- cgit