Forum: Ruby ruby 1.8 under windows 64 bits always return 0

Posted by Thierry M. (thierry_m)
on 2012-12-01 00:57
Hi

We have ruby scripts  for our build infrastructure.
We are migrating slowly to windows 64 bits machine and I noticed a
strange behavior easily reproducible.

I have the script script.rb that contains the command "exit 3"

I open a command window
When I run ( with ruby 1.8.6 or ruby 1.8.7)the command "ruby script.rb"
on windows 32 bits machine and do echo %ERRORLEVEL%
I have the value 3 popping up as expected.

When I run ( with ruby 1.8.6 or ruby 1.8.7)the command "ruby script.rb"
on windows 64 bits machine and do echo %ERRORLEVEL%
I have the value 0 popping up as NOT expected.
                              ---------------

ruby 1.9.2 does not have the problem. It is not  an option to migrate to
1.9.2 for the moment.
Is it a know issue? I am not able to find any reference to this problem
on the net

Thanks in advance for your inputs
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.