Project

General

Profile

Actions

Bug #5728

closed

SystemExit.new(bool, message)

Added by akr (Akira Tanaka) over 12 years ago. Updated over 12 years ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
-
Backport:
[ruby-dev:44951]

Description

I found SystemExit.new doesn't take a bool as exit status:

It works well if an integer is given for status.

% ./ruby -e 'SystemExit.new(0, "msg")'
% ./ruby -e 'SystemExit.new(1, "msg")'

But it doesn't work if the status is a bool.

% ./ruby -e 'SystemExit.new(true, "msg")'
-e:1:in initialize': wrong number of arguments (2 for 0..1) (ArgumentError) from -e:1:in initialize'
from -e:1:in new' from -e:1:in '
% ./ruby -e 'SystemExit.new(false, "msg")'
-e:1:in initialize': wrong number of arguments (2 for 0..1) (ArgumentError) from -e:1:in initialize'
from -e:1:in new' from -e:1:in '

% ./ruby -v
ruby 2.0.0dev (2011-12-08 trunk 33981) [x86_64-linux]

I think SystemExit.new should accept a bool.


Files

system-exit-bool.patch (1.56 KB) system-exit-bool.patch akr (Akira Tanaka), 12/11/2011 02:24 AM
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0