Conrad Schneiker wrote:
> ((I'm resending this because the previous message was automatically
> wrapped somewhere along the line at precisely the wrong point
> to show my initial problem.))
> 
> I got an error message of the following form:
> 
>     ./oops.rb:9005:in `open': No such file or
>     directory - /w/x/y/z (Errno::ENOENT)
> 
> But there was such a directory!

Guess I was reading the error message when I typed that. Just in
case it matters in the error-handling code, I should have said:

  But there was such a file!

> What prevented me from finding the retrospectively obvious error in a
> few seconds rather than a few minutes was the fact that the newline
> had been stripped from the path name that was displayed in the error
> message. It was very deceptive at first. (I did some further
> experimentation and found that if you have a space character at the
> end of your path, it is not stripped in the error message, but you
> could easily overlook what at first just looks like normal
> formatting.)
> 
> For this sort of error message, would it be possible to print the
> actual string with quotes around it?
> 
>     ./oops.rb:15:in `open': No such file or
>     directory - `/w/x/y/z
>     ' (Errno::ENOENT)

Conrad