Hi Dan -

Find.find(some path) do |path|
 puts path
 ...
end

suppose to loop all the files and sub directories, this is not the case
once import win32/file, the only print out I can get is the very top
level directory I pass in: say, if I run ruby test.rb -d "c:\temp",
then the only print out is "c:\temp", all files in that directory are
ignored. It should be pretty easy to verify. It almost seems like find
module has a dependency on File module, and win32/file is in odd with
it.

This is probably as much as I can find at this point ...

Oliver



On Nov 2, 10:50 am, "Daniel Berger" <djber... / gmail.com> wrote:
> Oliver wrote:
> > ok, usually, I ran the program and supply directory name "." as
> > current, that doesn't generate any warning message. However, if I
> > supply a full path, say "C;\temp", these are the error messages on the
> > console. This happen as soon as I put in "require win32/file"<snip>
>
> These are warnins not errors.  They are harmless - I redefine a bunch
> of methods in the File class.
>
> > C:\temp
> > c:/ruby/lib/ruby/gems/1.8/gems/win32-file-stat-1.2.2-mswin32/lib/win32/file/stat.rb:263:
> > warning: instance v
> > iable @directory not initializedThis one is strange, since @directory *is* initialized. But, I doubt
> it's the source of your problem
>
> None of this helps me, however.  You still haven't told me exactly what
> line specifically is failing.  With or without win32/file, you are
> going to get nil for File.size?("C:\\temp") or File.size?("."), since
> they are directories.  It must be something else.
> 
> - Dan