From: Charles Oliver Nutter Date: 2011-02-18T00:50:15+09:00 Subject: [ruby-core:35288] Re: [Ruby 1.9-Feature#4265][Open] Provide a core method Kernel#ruby for invoking a new Ruby instance On Wed, Feb 16, 2011 at 5:40 PM, Roger Pack wrote: >> As Hongli pointed out, and as Gem.ruby shows, it's easy enough to >> stitch together the right bits to re-launch the current Ruby. It's not >> so easy to hide the fact that you're physically launching a new >> process... > > Most people expect to be launching new processes from system...so if I > understand you correctly, this would be a shortcut for "don't launch a > new process if you don't have to" then, hence it being better to be a > whole new method (IO.ruby_system perhaps ?) ? Yeah, I agree with that. It could almost be IO.mvm_ruby where what you get back is not a PID but an object suitable for messaging with and controlling the child Ruby. Whether it runs in a separate process or not is an implementation detail that the API might hide or expose through an option. But basically, it would be a way to say "I just want to run this Ruby code in a clean environment...do that however you will". - Charlie