Then your getc may do something different than mine (BSD-ish).
···
On Jan 29, 2007, at 10:32, Jacob Fugal wrote:
On 1/29/07, James Edward Gray II <james@grayproductions.net> wrote:
I just upgraded to Ruby 1.8.5 to see if it would make a difference,
but I still don't get prompted for input and it still tells me $stdin
is [eof]:
I can confirm on my machine:
great - that make one of us! 
-a
···
On Thu, 1 Feb 2007, James Edward Gray II wrote:
Thank to all for helping me to understand this issue.
--
we can deny everything, except that we have the possibility of being better.
simply reflect on that.
- the dalai lama
In other words, you don't feel this is a Ruby issue, right?
James Edward Gray II
···
On Jan 30, 2007, at 12:38 PM, Eric Hodel wrote:
On Jan 29, 2007, at 10:32, Jacob Fugal wrote:
On 1/29/07, James Edward Gray II <james@grayproductions.net> wrote:
I just upgraded to Ruby 1.8.5 to see if it would make a difference,
but I still don't get prompted for input and it still tells me $stdin
is [eof]:
I can confirm on my machine:
Then your getc may do something different than mine (BSD-ish).
I spent a bit of time looking at the code in io.c. This
file has changed radically from the 1.8 branch to the
1.9 (trunk) branch. But...
On my platform (Darwin 8.8.0 Power Macintosh):
1.9 from sources works
1.8 (head) from source works
1.8.5 from darwin ports broken
1.8.3 from source works
So perhaps there is something to Ara's suggestion that
the packaged version of ruby for Mac OS X is broken. I
don't have access to linux.
I'm rebuilding 1.8.5 from source now...
Gary Wright
···
On Jan 31, 2007, at 2:32 PM, ara.t.howard@noaa.gov wrote:
On Thu, 1 Feb 2007, James Edward Gray II wrote:
Thank to all for helping me to understand this issue.
great - that make one of us! 
Is the Darwin Ports (macports) maintainer for Ruby on this list?
The problem that James originally reported only seems
to exist in the Darwin Ports version of 1.8.5:
$ ruby -v
ruby 1.8.5 (2006-08-25) [powerpc-darwin8.7.0]
I just built from the current 1.8.5 branch and the problem doesn't
exist:
$ ./ruby -v
ruby 1.8.5 (2007-01-27 patchlevel 17) [powerpc-darwin8.8.0]
$ ./ruby -e 'Thread.new{} and p $stdin.eof?' # pause until ctrl-D entered
true
Gary Wright
···
On Jan 31, 2007, at 7:05 PM, gwtmp01@mac.com wrote:
I'm rebuilding 1.8.5 from source now...
Na. I don't use MacPorts. I built Ruby from source.
James Edward Gray II
···
On Feb 1, 2007, at 2:35 PM, gwtmp01@mac.com wrote:
The problem that James originally reported only seems
to exist in the Darwin Ports version of 1.8.5:
I wonder if this is related to the --enable-pthread option. I used it and wouldn't be surprised to hear that MacPorts did too. Did you use this option when you did this test?
James Edward Gray II
···
On Feb 1, 2007, at 2:35 PM, gwtmp01@mac.com wrote:
I just built from the current 1.8.5 branch and the problem doesn't
exist:
$ ./ruby -v
ruby 1.8.5 (2007-01-27 patchlevel 17) [powerpc-darwin8.8.0]
I just typed:
autoconf; ./configure; make
I'll try:
./configure --enable-pthread; make
and report back...
Gary Wright
···
On Feb 1, 2007, at 3:46 PM, James Edward Gray II wrote:
On Feb 1, 2007, at 2:35 PM, gwtmp01@mac.com wrote:
I just built from the current 1.8.5 branch and the problem doesn't
exist:
$ ./ruby -v
ruby 1.8.5 (2007-01-27 patchlevel 17) [powerpc-darwin8.8.0]
I wonder if this is related to the --enable-pthread option. I used it and wouldn't be surprised to hear that MacPorts did too. Did you use this option when you did this test?
Sure enough. When I compiled 1.8.5 with --enable-pthread the test failed.
Ruby 1.9 wouldn't compile with --enable-pthread but works without.
Gary Wright
···
On Feb 1, 2007, at 3:46 PM, James Edward Gray II wrote:
I wonder if this is related to the --enable-pthread option. I used it and wouldn't be surprised to hear that MacPorts did too. Did you use this option when you did this test?
Ah, so it's likely a pthread issue. Most of the instruction articles floating around the web for installing Ruby on Mac OS X recommend adding that option, which is probably why we see this on that platform.
What is the advantage of pthread? I don't know.
James Edward Gray II
···
On Feb 1, 2007, at 5:51 PM, gwtmp01@mac.com wrote:
On Feb 1, 2007, at 3:46 PM, James Edward Gray II wrote:
I wonder if this is related to the --enable-pthread option. I used it and wouldn't be surprised to hear that MacPorts did too. Did you use this option when you did this test?
Sure enough. When I compiled 1.8.5 with --enable-pthread the test failed.