On Fri, 29 Dec 2000, Dave Thomas wrote: > Robert Feldt <feldt / ce.chalmers.se> writes: > > > Is there some way of preventing the "command not found" printed by Ruby > > when the command specified in backquotes isn't found? The example in the > > book (p. 75) shows how to get an exception back when this happens but it > > doesn't avoid printing the "command not found" message to stderr. > > You could look at using open3, which lets you capture the stderr of a > subprocess. The downside is that open3 hides the return status of the > subprocess from you ($? is always 0). > Ok, thanks, but wouldn't it be better if backquote throws an exception? Maybe in 1.7.X, matz? Or is there some downside? Regards, Robert