From: Narayanan K on
[Note: parts of this message were removed to make it a legal post.]

Hi,


I have a situation where I need to create a pipe into which I load ruby/irb
commands.
Then I have to direct input from this pipe to IRB (Interactive Ruby) .
Also I will have an output pipe to which the irb results/output are
redirected to.

Thus I am changing the STDIN/STDOUT of IRB to Input/Output to/from pipe.

Please suggest ways by which I can do this..

Thanks in advance,

Narayanan

From: Martin DeMello on
On Wed, Jun 16, 2010 at 9:04 PM, Narayanan K <knarayanan88(a)gmail.com> wrote:
> Hi,
>
>
> I have a situation where I need to create a pipe into which I load ruby/irb
> commands.
> Then I have to direct input from this pipe to IRB (Interactive Ruby) .
> Also I will have an output pipe to which the irb results/output are
> redirected to.
>
> Thus I am changing the STDIN/STDOUT of IRB to Input/Output to/from pipe.

Check out my guirb project: http://github.com/martindemello/guirb

martin

From: Hidetoshi NAGAI on
From: Martin DeMello <martindemello(a)gmail.com>
Subject: Re: Input/Output to IRB using Pipes
Date: Thu, 17 Jun 2010 01:24:48 +0900
Message-ID: <AANLkTik7b96X2h0RhD01iBoRS0QHvfGNBXs0iiXfuCMT(a)mail.gmail.com>
> > I have a situation where I need to create a pipe into which I load ruby/irb
> > commands.
> > Then I have to direct input from this pipe to IRB (Interactive Ruby) .
> > Also I will have an output pipe to which the irb results/output are
> > redirected to.
> >
> > Thus I am changing the STDIN/STDOUT of IRB to Input/Output to/from pipe.
>
> Check out my guirb project: http://github.com/martindemello/guirb

Are 'irbtkw.rbw' and 'tktextio.rb' useful?
Those exist on "ext/tk/sample" directory of Ruby's source tree.
--
Hidetoshi NAGAI (nagai(a)ai.kyutech.ac.jp)