From: James Edward Gray II Date: 2007-02-01T04:23:18+09:00 Subject: Re: Net::HTTP Closes STDIN On Jan 31, 2007, at 12:30 AM, Eric Hodel wrote: > On Jan 30, 2007, at 19:08, James Edward Gray II wrote: >> On Jan 30, 2007, at 5:28 PM, ara.t.howard@noaa.gov wrote: >>> this could get tricky to debug! >> >> Bingo. It's actually a pretty significant problem for HighLine >> because after you do something like fetching a web page, HighLine >> believes $stdin to e closed and won't allow you to ask the user >> any more questions. I fear we will need to disable HighLine's eof? >> () check the work around this. > > Then it sounds like HighLine needs to check #closed? or continue > reading until IOError. But, as you pointed out, closed?() is not the same as eof?(). Watching for an IOError also isn't very reliable since HighLine's input stream may be anything from STDIN, to a Socket, with IO and StringIO in between. For now, I've added a workaround so user code can disable HighLine's EOF checks as needed. Thank to all for helping me to understand this issue. James Edward Gray II