Online Ruby interpreter somewhere?

M

Michael Neumann

Hi,

I know there's the great www.ruby.ch online interpreter. But is the code
for it somewhere available? I'd like to setup the same, but for Ruby 1.8.

Regards,

Michael
 
S

Stefan Schmiedl

Well, we have the Sandbox class in Appendix F of our Ruby book, IIRC.
You *do* have one, Michael, don't you?

s.
 
M

Michael Neumann

Stefan said:
Well, we have the Sandbox class in Appendix F of our Ruby book, IIRC.
You *do* have one, Michael, don't you?

Yes of course ;-)

I've tried it, but the @sandboxOutput and @sandboxError variables are
not filled when "puts" etc. is called! Not sure whether the best way is
to repopen STDOUT/STDERR to a temporary file (is it possible to do this
without affecting the host-program?) or whether I should only redefine
"puts" etc.

Okay, in SAFE=4 mode, I should definitly redefine "puts", as the
original puts will not work.

Thanks.

Regards,

Michael
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,190
Latest member
ClayE7480

Latest Threads

Top