1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@953 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
eban 2000-09-21 10:08:57 +00:00
parent b35df6aae2
commit ca13525d5d
3 changed files with 13 additions and 5 deletions

View file

@ -1,3 +1,7 @@
Thu Sep 21 19:04:34 2000 WATANABE Hirofumi <eban@os.rim.or.jp>
* ext/extmk.rb (install_rb): check whether libdir is directory or not.
Thu Sep 21 17:23:05 2000 Yukihiro Matsumoto <matz@ruby-lang.org> Thu Sep 21 17:23:05 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
* file.c (rb_file_s_symlink): use HAVE_SYMLINK. * file.c (rb_file_s_symlink): use HAVE_SYMLINK.

View file

@ -145,11 +145,13 @@ def install_rb(mfile, srcdir = nil)
libdir = srcdir + "/" + libdir if srcdir libdir = srcdir + "/" + libdir if srcdir
path = [] path = []
dir = [] dir = []
Find.find(libdir) do |f| if File.directory? libdir
next unless /\.rb$/ =~ f Find.find(libdir) do |f|
f = f[libdir.length+1..-1] next unless /\.rb$/ =~ f
path.push f f = f[libdir.length+1..-1]
dir |= File.dirname(f) path.push f
dir |= File.dirname(f)
end
end end
for f in dir for f in dir
next if f == "." next if f == "."

View file

@ -9,9 +9,11 @@
module Find module Find
def find(*path) def find(*path)
p ["find", path]
while file = path.shift while file = path.shift
catch(:prune) { catch(:prune) {
yield file yield file
p ["find", file]
if File.lstat(file).directory? then if File.lstat(file).directory? then
d = Dir.open(file) d = Dir.open(file)
begin begin