I think I found my issue...running under linux, the shell substitutes its own $? when the -e bit is double-quoted.

[EMAIL PROTECTED]:~/testrails/test4$ ruby -e 'fork { exit 99 }; Process.wait; p $?.class'
Process::Status
[EMAIL PROTECTED]:~/testrails/test4$ ruby -e "fork { exit 99 }; Process.wait; p $?.class"
Fixnum

So the second one ultimately executes "for { exit 99 }; Process.wait; p 0.class", which obviously prints Fixnum.

So at least now we understand my issue...we just need to make our process execution return a Process::Status instead of a Fixnum.

On 6/26/06, Thomas E Enebo <[EMAIL PROTECTED]> wrote:
On Mon, 26 Jun 2006, Charles O Nutter defenestrated me:

>
>    The plugin script fails (as perhaps do others) because we do not
>    return a Process::Status object when executing an external process; we
>    return a Fixnum.
>    Process::Status defines a success? method which Rails is using. That
>    blows up with a NoMethodError, which Rails of course swallows.
>    The fix is to make $? a Process::Status object (we do not have the
>    class or any of its methods defined as yet).
>    Oddly enough, there seems to be a 1.8.4 bug in that ruby -e scripts
>    set $? to a Fixnum. I'm going to ask them about it.

[enebo ~/]$ ruby -e '`ls`; p $?.class'
-e:1: warning: Insecure world writable dir /home/enebo, mode 040777
Process::Status

  Could that only be on linux?  It appears to work on winderz

-Tom

--
+ http://www.tc.umn.edu/~enebo +---- mailto:[EMAIL PROTECTED] ----+
| Thomas E Enebo, Protagonist  | "Luck favors the prepared    |
|                              |  mind." -Louis Pasteur       |

Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Jruby-devel mailing list
Jruby-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jruby-devel



--
Charles Oliver Nutter @ headius.blogspot.com
JRuby Developer @ www.jruby.org
Application Architect @ www.ventera.com
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Jruby-devel mailing list
Jruby-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jruby-devel

Reply via email to