From ca13525d5d52113e1ba0bb1711ab17a5215466be Mon Sep 17 00:00:00 2001 From: eban Date: Thu, 21 Sep 2000 10:08:57 +0000 Subject: [PATCH] eban git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@953 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 4 ++++ ext/extmk.rb.in | 12 +++++++----- lib/find.rb | 2 ++ 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 941e132a42..39abcd6f2f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Thu Sep 21 19:04:34 2000 WATANABE Hirofumi + + * ext/extmk.rb (install_rb): check whether libdir is directory or not. + Thu Sep 21 17:23:05 2000 Yukihiro Matsumoto * file.c (rb_file_s_symlink): use HAVE_SYMLINK. diff --git a/ext/extmk.rb.in b/ext/extmk.rb.in index 59536c4944..becabfc7c6 100644 --- a/ext/extmk.rb.in +++ b/ext/extmk.rb.in @@ -145,11 +145,13 @@ def install_rb(mfile, 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 == "." diff --git a/lib/find.rb b/lib/find.rb index a8dcea4f71..ce3e7068c3 100644 --- a/lib/find.rb +++ b/lib/find.rb @@ -9,9 +9,11 @@ module Find def find(*path) +p ["find", path] while file = path.shift catch(:prune) { yield file +p ["find", file] if File.lstat(file).directory? then d = Dir.open(file) begin