popen3 seems to work with jruby 1.3.0 (as least for me, and at least
for stderr and stdout).

Cheers,
Tal

On Mon, Jun 22, 2009 at 2:33 PM, Rhett Sutphin<[email protected]> wrote:
> Hi,
>
> On Jun 20, 2009, at 3:40 PM, Daniel Spiewak wrote:
>
>>> Re: testing, have you considered capturing stdin/stdout, feeding commands
>>> to
>>> the interpreters and checking the results?
>>
>>
>> That's not a bad idea.  Unfortunately, it means that to run the tests on
>> JRuby, I would have to implement more of the `sh` API than I wanted to.
>> :-)  I haven't reimplemented Kernel::`` or similar, just the FileUtils
>> function, so there's really no way for me to capture any of the relevant
>> streams.
>
> I see that popen3 doesn't work on JRuby (the error message says it's because
> fork isn't available).  What about making the specs conditional so that they
> only run under MRI?  Then the specs-executing-in-MRI could use popen3 to run
> the same specs for the shell feature running with both JRuby (if it is
> available) and MRI.
>
> Maybe that's too baroque for the main spec suite.  It seems better than not
> having any specs at all, though.
>
> Rhett
>

Reply via email to