When you say it's provided as input, where does this input come from?
Users?  If so, well...  I really hope you know what you're doing.

--Michael


On Mon, Mar 2, 2009 at 8:14 AM, Sudhi Kulkarni
<[email protected]> wrote:
>
> Hi,
>
> I am a newbie to ruby and want to execute a ruby file that is provided
> as input. I want to be able to redirect the output of the execution to a
> log file as well.
>
> I am basically looking at executing a test.rb file which could contain
> (Sample only)
>
> print "hello world"
> sum=2+3
> print sum
>
> I tried kernel eval but will need to do this per line and also I am not
> able to access sum in the print in 3rd line.
>
> I also tried pipe open but then could not redirect the output to a file.
>
> Any help in this regard would be very helpful.
>
> Thanks,
> Sudhindra
> --
> Posted via http://www.ruby-forum.com/.
>
> >
>



-- 
(Ruby, Rails, Random) blog:  http://skandragon.blogspot.com/

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to