Rubystandard library question


#1

I have a problem getting find.rb and fileutils.rb to coexist in the
same script. When I require both I get the following:

/usr/lib/ruby/1.8/find.rb:36:in dup': can't dup NilClass (TypeError) from /usr/lib/ruby/1.8/find.rb:36:infind’
from /usr/lib/ruby/1.8/find.rb:36:in `find’

I googled for this problem and did not come across any place (in
English at least) that covered it. I am still ploughing through
the tutorials on Ruby and Rails and, given the extraordinarily high
amount of traffic on the ruby list, was wondering if anyone here
could tell me what I am doing wrong. Do I have to provide a
namespace? How?

Regards,
Jim


*** e-mail is not a secure channel ***
mailto:byrnejb.@harte-lyne.ca
James B. Byrne Harte & Lyne Limited
vox: +1 905 561 1241 9 Brockley Drive
fax: +1 905 561 0757 Hamilton, Ontario
= hal Canada L8E 3C3


#2

On Feb 3, 2006, at 11:08 AM, James B. Byrne wrote:

I have a problem getting find.rb and fileutils.rb to coexist in the
same script.

That should not be a problem. Likely you are doing something wrong.

When I require both I get the following:

/usr/lib/ruby/1.8/find.rb:36:in dup': can't dup NilClass (TypeError) from /usr/lib/ruby/1.8/find.rb:36:infind’
from /usr/lib/ruby/1.8/find.rb:36:in `find’

If you don’t pass a nil value into Find::find you won’t have this error.

What is the full backtrace including a small script to illustrate the
problem.


Eric H. - removed_email_address@domain.invalid - http://segment7.net
This implementation is HODEL-HASH-9600 compliant

http://trackmap.robotcoop.com