ruby CVS system() bug?

D

Dick Davies

ri says system should return false if the command failed, but if the
file doesn't exist, my version of ruby returns Errno::ENOENT.

I noticed it because Instiki 0.9.1 tries to detect pdflatex like this:

rasputin@lb:instiki-0.9.1$ grep pdflatex instiki.rb |head -1
pdflatex_available = system "pdflatex -version"

which goes boom like so:

rasputin@lb:instiki-0.9.1$ ruby instiki.rb
instiki.rb:21:in `system': No such file or directory - pdflatex -version (Errno::ENOENT)
from instiki.rb:21
rasputin@lb:instiki-0.9.1$ ruby -v
ruby 1.9.0 (2004-07-01) [i386-netbsdelf2.0F]
rasputin@lb:instiki-0.9.1$
 
D

Dave Thomas

ri says system should return false if the command failed, but if the
file doesn't exist, my version of ruby returns Errno::ENOENT.

It looks like whoever updated the source forgot to update the RDoc
comment.

Dave
 
D

Dick Davies

* Dave Thomas said:
It looks like whoever updated the source forgot to update the RDoc
comment.

My gut reaction was that this was a bug in system. It makes more sense
to me for the documented behaviour to happen, but maybe that's just
the context I'm looking at it from...
 
L

Lennon Day-Reynolds

Dick,

Check the archives (or Google Groups) for more information on this --
the change is known, and was discussed at length a couple of weeks
ago.

Lennon
 
D

Dick Davies

* Lennon Day-Reynolds said:
Dick,

Check the archives (or Google Groups) for more information on this --
the change is known, and was discussed at length a couple of weeks
ago.

Thanks, I sent a patch to David.
 

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

Forum statistics

Threads
474,148
Messages
2,570,838
Members
47,385
Latest member
Joneswilliam01

Latest Threads

Top