VM help

A

Alexander Cohen

Hello,

Can anyone out there point me to some tutorial or examples on how to
use the Ruby VM? Most specifically, how to separate the VM into
multiple contexts with their own set of global objects and maybe how
to use the stack functions.

thx

AC
 
R

Robert Klemme

Can anyone out there point me to some tutorial or examples on how to
use the Ruby VM? Most specifically, how to separate the VM into
multiple contexts with their own set of global objects and maybe how
to use the stack functions.

I don't think there is an easy way to sandbox multiple contexts and
still use global variables etc. You would at least have to hack the
interpreter, I guess. What are you trying to accomplish?

Kind regards

robert
 
A

Alexander Cohen

I don't think there is an easy way to sandbox multiple contexts and
still use global variables etc. You would at least have to hack the
interpreter, I guess. What are you trying to accomplish?

I am adding ruby to be used as a scripting language in WebKit/WebCore.
It's really working great but it's not feasable for anything else than
playing around if i can't sandbox multiple contexts. I could build the
ruby VM directly into the core and hack it for multiple contexts but i
was hoping i would not need to do that. Are there any other options
out there?

AC
 
B

Brian Candler

Alexander said:
I am adding ruby to be used as a scripting language in WebKit/WebCore.
It's really working great but it's not feasable for anything else than
playing around if i can't sandbox multiple contexts. I could build the
ruby VM directly into the core and hack it for multiple contexts but i
was hoping i would not need to do that. Are there any other options
out there?

Google for "ruby sandbox" and you should find the sandbox gem - e.g.
second hit I get is
http://flouri.sh/2009/4/4/how-to-set-up-the-ruby-sandbox

It's a C extension but requires only one small patch to the ruby
interpreter.

IIRC it was one of _why's projects - to skip a long (and possibly
unfinished) story, he destroyed his own code repositories. However there
appear to be various forks available on github.

# gem sources
*** CURRENT SOURCES ***

http://gems.rubyforge.org/
http://gems.github.com/

# gem search --remote sandbox

*** REMOTE GEMS ***

bdimcheff-sandbox (0.1.1)
file_sandbox (0.5)
nkryptic-sandbox (0.2.4)

Regards,

Brian.
 

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

No members online now.

Forum statistics

Threads
473,813
Messages
2,569,696
Members
45,478
Latest member
dontilydondon

Latest Threads

Top