From: Brad Date: 2003-12-17T23:41:56+09:00 Subject: Re: Very odd IO problem This message has been automatically forwarded from the ruby-talk mailing list by a gateway at pragprog.com. If it is SPAM, it did not originate at pragprog.com. Please report the original sender, and not us. Thanks! wrote: > Hi, > > At Wed, 17 Dec 2003 21:07:00 +0900, > Brad wrote: > > Thanks for the response! I applied the specified patch to util.c > > however, it doesn't seem to have made a difference. Dir.getwd works > > ok, I think the problem is in the ``. I'll keep looking and if I find > > something I will be sure to post the fix. > > I know the previous patch wouldn't fix the odd behavior, since > it was just for the style of returned value from Dir.getwd. > > I doubt that it might be concerned with READ_DATA_PENDING(), > READ_DATA_BUFFERED() etc, however, it would need more > investigation. > > * Does File.read method work correctly? > * That behavior occurs with pipe? > > Nobu: I tried using File.read and it worked successfully. I have also made other experiments which lead me to believe that pipes work as expected: `perl cwd.prl` ==> Worked correctly `@[]cwd.com` ==> Worked correctly (VMS .com files are akin to .BAT files on MS-DOS) I've also tried using miniruby and wrapping the call to the ruby script in perl and DCL (.com file), each of which returned the output: C==character of a path C\nC\nC\n which prints as one would expect: C C C It seems only to occur when I invoke ruby from ruby. Regards, Brad