I tracked down the shell wildcard problem with my original patch and also tidied things up a bit and fixed a couple of additional bugs I ran into during testing. With this patch Kernel#system and Kernel#backquote now pass all the rubicon tests.

One change I made that could have future repercussions is to temporarily redirect stdout to a buffer (see line 815 in the patched file) while executing a second ruby script in-process (this is required since you need to capture the output of the script executed via Kernel#backtick). This works fine for a single threaded script but might cause problems if multiple threads start executing additional scripts concurrently. There doesn't appear to be an easy fix to this but as I'm new to the code I might have missed something.

Marc.

---
Marc Hadley <marc.hadley at sun.com>

Attachment: exec_ruby_scripts_in_process.patch
Description: Binary data


Reply via email to