Kernel.exit should raise SystemExit with status 0
-------------------------------------------------

                 Key: JRUBY-4628
                 URL: http://jira.codehaus.org/browse/JRUBY-4628
             Project: JRuby
          Issue Type: Bug
          Components: Core Classes/Modules
    Affects Versions: JRuby 1.4
            Reporter: Alex Boisvert


On MRI, Kernel.exit raises a SystemExit with status code 0:

boisv...@smudge:~$ ruby -v
ruby 1.8.7 (2009-06-12 patchlevel 174) [i486-linux]

boisv...@smudge:~$ irb
irb(main):001:0> begin
irb(main):002:1*   Kernel.exit
irb(main):003:1> rescue SystemExit => e
irb(main):004:1>   p "exit #{e.status}"
irb(main):005:1> end
"exit 0"
=> nil

whereas on JRuby 1.4 the status code is 1,

boisv...@smudge:~$ jruby -v
jruby 1.4.0 (ruby 1.8.7 patchlevel 174) (2009-11-02 69fbfa3) (Java HotSpot(TM) 
Client VM 1.6.0_17) [i386-java]

boisv...@smudge:~/svn/buildr-trunk$ jirb
irb(main):001:0> begin                 
irb(main):002:1*   Kernel.exit         
irb(main):003:1> rescue SystemExit => e
irb(main):004:1>   p "exit #{e.status}"
irb(main):005:1> end                   
"exit 1"
=> nil


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to