Find.find bug?

M

Martin DeMello

$ ruby -rfind -e 'Find.find("foo") {|e| p e}'
"foo"

$ ls foo
C:\msys\1.0\local\bin\ls.exe: foo: No such file or directory

It should return nothing if foo doesn't exist.

martin
 
N

nobu.nokada

Hi,

At Wed, 8 Sep 2004 00:45:09 +0900,
Martin DeMello wrote in [ruby-talk:111751]:
$ ruby -rfind -e 'Find.find("foo") {|e| p e}'
"foo"

$ ls foo
C:\msys\1.0\local\bin\ls.exe: foo: No such file or directory

It should return nothing if foo doesn't exist.

What version ruby do you run?

$ LANG=C ls foo
ls: foo: No such file or directory
$ ruby -v -rfind -e 'Find.find("foo") {|e| p e}'
ruby 1.9.0 (2004-09-07) [i686-linux]
 
G

gabriele renzi

Martin DeMello ha scritto:
$ ruby -rfind -e 'Find.find("foo") {|e| p e}'
"foo"

$ ls foo
C:\msys\1.0\local\bin\ls.exe: foo: No such file or directory

It should return nothing if foo doesn't exist.

can't confirm it here, could ypou give more info:
C:\Documents and Settings\gabriele>ls foo
ls: foo: No such file or directory

C:\Documents and Settings\gabriele>ruby -rfind -e "Find.find('foo') {|e|
p e }"

C:\Documents and Settings\gabriele>ruby -v
ruby 1.8.2 (2004-07-29) [i386-mswin32]

(winxp pro)
 
M

Martin DeMello

What version ruby do you run?

$ LANG=C ls foo
ls: foo: No such file or directory
$ ruby -v -rfind -e 'Find.find("foo") {|e| p e}'
ruby 1.9.0 (2004-09-07) [i686-linux]

$ ruby -v
ruby 1.8.1 (2003-12-25) [i386-mswin32]

(one click installer)

martin
 
M

Martin DeMello

gabriele renzi said:
Martin DeMello ha scritto:

can't confirm it here, could ypou give more info:

Just asked on #ruby-lang - it's been fixed in 1.8.2. Sorry about the
noise.

martin
 
M

Michal 'hramrach' Suchanek

$ ruby -rfind -e 'Find.find("foo") {|e| p e}'
"foo"

$ ls foo
C:\msys\1.0\local\bin\ls.exe: foo: No such file or directory
Another one:
suchanek:~/amrita-1.0.2-patched/test-dir hramrach$ ls -l
celkem 0
lrwxr-xr-x 1 hramrach hramrach 12 z·# 13 18:48 A ->
/nonexistent
-rw-r--r-- 1 hramrach hramrach 0 z·# 13 18:49 B
suchanek:~/amrita-1.0.2-patched/test-dir hramrach$ ruby -e 'require
"find" ; Find.find("."){|n| STDERR.puts n }'
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top