Input/Output to IRB using Pipes

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

Check out my guirb project: GitHub - martindemello/guirb: Graphical IRB wrappers

martin

···

On Wed, Jun 16, 2010 at 9:04 PM, Narayanan K <knarayanan88@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.

Message-ID: <AANLkTik7b96X2h0RhD01iBoRS0QHvfGNBXs0iiXfuCMT@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: GitHub - martindemello/guirb: Graphical IRB wrappers

Are 'irbtkw.rbw' and 'tktextio.rb' useful?
Those exist on "ext/tk/sample" directory of Ruby's source tree.

···

From: Martin DeMello <martindemello@gmail.com>
Subject: Re: Input/Output to IRB using Pipes
Date: Thu, 17 Jun 2010 01:24:48 +0900
--
Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)