Thank you very much.

Now I can use STDOUT.reopen to redirect STDOUT output to a file.But How can I redirect it to a string?

Thanks.



David Roberts <smartgpx / gmail.com> writes:

> yong wrote:
>> Hi all
>> 
>> I'm writting a program to detect the cursor position with the vt100 
>> command "\x1b[6n".
>> 
>> So I need to redirect STDOUT to a string.
>> 
>> How can I do this?
>> 
>> Thanks
>
> I suggest looking at the code for the win2console library, which gives 
> an example of something similar.
>
>
> -- 
> Posted via http://www.ruby-forum.com/.
>

-- 
My Personal Website:

http://www.twinbee.info

ܿͼ

cn.comp.lang.perl
cn.comp.lang.c
cn.comp.www
cn.music
cn.music.classical