On Jan 29, 2007, at 3:54 AM, Eric Hodel wrote:

> On Jan 27, 2007, at 22:01, James Edward Gray II wrote:
>> OK, that makes sense.  However, why does moving that eof?() check  
>> below a Net::HTTP page fetch change this?
>
> I don't see this behavior.  With your original example I have to  
> hit ^D to get a prompt back.
>
> $ ruby -v
> ruby 1.8.5 (2006-12-04 patchlevel 2) [i686-darwin8.8.2]

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 closed:

Firefly:~/Desktop$ ruby -v
ruby 1.8.5 (2006-12-25 patchlevel 12) [i686-darwin8.8.1]
Firefly:~/Desktop$ cat stdin_eof_issue.rb
require 'net/http'
require 'io/wait'

Net::HTTP.start('www.ruby-lang.org', 80) do |http|
   body = http.get('/en/license.txt').body
end
p $stdin.eof?
Firefly:~/Desktop$ ruby stdin_eof_issue.rb
true

James Edward Gray II