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

On Wed, Jun 16, 2010 at 9:04 PM, Narayanan K [email protected]
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: GitHub - martindemello/guirb: Graphical IRB wrappers

martin

From: Martin DeMello [email protected]
Subject: Re: Input/Output to IRB using Pipes
Date: Thu, 17 Jun 2010 01:24:48 +0900
Message-ID:
[email protected]

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.