Resolution: Won't Fix
Affects Version/s: None
Fix Version/s: None
Number of attachments :
RCR 328 calls for a method to be added to Kernel specifically for launching additional Ruby scripts. This is to allow the possibility of launching those scripts in ways other than launching an external process.
This issue arose when we started running Rake scripts that included many unit tests. The default Rake behavior is to launch a separate process, which for JRuby was an unreasonable thing to do. We added hacks and tricks into our Kernel#system call to prevent Ruby scripts from launching out-of-process, but this solution is far from ideal. What would be best is if there were a Kernel method allowing you to simply launch a script in its own environment.
Ruby 1.8 would just follow the current path, launching a separate Ruby process to run the script.
JRuby would launch a new runtime in the same JVM, as we do with the Kernel#system hacks.
YARV would follow a similar approach, launching another YARV VM in the same process.
_why has also been working on a Ruby sandbox, which could easily be used to provide some level of Ruby MVM in the 1.8 series. He has expressed his support for RCR 328.
We need to work with the Ruby-core folks and others interested in this RCR to come up with a reasonable API, and ideally a patch for 1.8 to get it included. Once it's there, we need to work Rake and other application authors to have them migrate to using this new API for launching scripts, so that at some point in the future we'll be able to remove our Kernel#system hacks.