From: Brad Date: 2003-12-17T21:07:00+09:00 Subject: Re: Very odd IO problem nobu.nokada@softhome.net wrote: > Hi, > > At Wed, 17 Dec 2003 10:21:57 +0900, > Brad wrote: > > I have a very strange problem. I'm hoping someone can help me with > > an answer or at least point me in the right direction. I've been > > plagued with this problem for quite sometime now, however, up until > > now it has only been an intermittent problem. > > > > File: [bh.scripts]cwd.rb > > print Dir.getwd > > At first, this script works correctly? Which do you have the > problem, with Dir.getwd only or with backticks? > > Anyhow, perhaps VMS style path names would cause many problems > at File.dirname etc. > > > Index: util.c > =================================================================== > RCS file: /cvs/ruby/src/ruby/util.c,v > retrieving revision 1.38 > diff -u -2 -p -r1.38 util.c > --- util.c 22 Nov 2003 03:59:18 -0000 1.38 > +++ util.c 17 Dec 2003 03:11:48 -0000 > @@ -638,4 +638,8 @@ ruby_getcwd() > { > #ifdef HAVE_GETCWD > +# ifdef __VMS > + char *buf = getcwd(NULL, 0, 0); > + if (!buf) rb_sys_fail("getcwd"); > +# else > int size = 200; > char *buf = xmalloc(size); > @@ -646,4 +650,5 @@ ruby_getcwd() > buf = xrealloc(buf, size); > } > +# endif > #else > # ifndef PATH_MAX > > > Nobu: 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 will remain open to suggestions as I've hunted this problem off and on for quite awhile. Any suggestions are appreciated. Regards, Brad