From: James Edward Gray II Date: 2007-08-04T08:19:45+09:00 Subject: Re: HighLine and Readline On Aug 3, 2007, at 6:01 PM, Gregory Brown wrote: > On 8/3/07, Ari Brown wrote: >> Hey, >> >> Good news: >> >> In my quest for buffer a user's input serverside, I have found an >> answer (which is rather easy). >> Oh, and I got HighLine working over sockets. >> >> I need to use HighLine::Question with the Readline attribute. >> >> But unfortunately, according to the documentation I found, using the >> readline attribute will make readline be a ruby-rebel and use it's >> own input and output streams ($stdin and $stdout, I assume). >> >> So my question is this: How can I make the readline attribute use >> specific input and output streams? >> >> I'm imaging something like this (it is probably waaaaaaay wrong): >> >> a = HighLine.new(@sock, @sock) >> a.ask("monkey? ") {|q| q.readline(@sock, @sock) } > > Here's the relevant source, as you can see it ignores your input > stream. If you know how to point Readline at another IO, we take patches. ;) James Edward Gray II