From: Jim Freeze Date: 2003-01-15T12:48:45+09:00 Subject: Re: ruby -e not printing to stdout On Wednesday, 15 January 2003 at 8:09:47 +0900, Yukihiro Matsumoto wrote: > Hi, > > In message "ruby -e not printing to stdout" > on 03/01/15, Jim Freeze writes: > > |I just noticed this: > | > |jfn@juno 140 /home/jfn > ruby -v > |ruby 1.7.3 (2002-12-17) [sparc-solaris2.8] > |jfn@juno 141 /home/jfn > ruby -e 'p 5' > |jfn@juno 142 /home/jfn > ruby -e 'print 5' > |niljfn@juno 143 /home/jfn > ruby -e 'puts 5' > | > |jfn@juno 144 /home/jfn > ruby -e 'puts "1\n2\n"' > | > |Is this a known problem? > > No. Actually, I don't know what is causing this problem. > I've never heard of such a problem, but this seems too fundamental to > be unknown. Could you describe the problem in detail? Ok, I found the source, (it doesn't appear to be Ruby's fault) but it's not clear to me how to correct it. I have wrapper csh script that calls exec on ruby. Exec is supposed to redirect stdio. Since I get the version to print it appears to be working for stderr, but not for stdout. % -> ruby.wrap -e 'puts $:.join("\n")' -> ./ruby.wrap -v ruby 1.7.3 (2002-12-04) [i386-freebsd4.6] % -> cat ruby.wrap #! /bin/csh -f exec /home/jfreeze/ruby173/bin/ruby $argv[*] Anyone know how to fix this? Thanks -- Jim Freeze ---------- Sanity is the trademark of a weak mind. -- Mark Harrold