Sunday, March 14, 2010

Capturing Standard Output from an IronRuby Script using the DLR APIs

Programmer Question

I have a very simple test.rb file:



puts "Hello World"


I want to execute this file within c#, eg:



var runtime = Ruby.CreateRuntime();
runtime.ExecuteFile("C:\test.rb");


How can I capture the "Hello World"?



Find the answer here

No comments:

Post a Comment

LinkWithin

Related Posts with Thumbnails