% ./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 -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 -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 ’
it is very diffcult to use SystemExit.new for EXIT_FAILURE.
I overlooked Kernel#exit. then I withdraw my argument. Thank you
for clarification. But, I’m still bit worry about confusable thing
because
a lot of people know EXIT_SUCCESS==0 on their platform. so please
write a doc true convert to EXIT_SUCCES, and not 1 clearly.
The latter choice is not acceptable, since the return value of
(({Kernel#system})) and the first argument of (({Kernel#exit})) are same as the
former.
And should not assume (({EXIT_SUCCESS})) to be 0.
Agreed.
In addition, if this issue (#5728) and
Process::EXIT_SUCCESS/Process::EXIT_FAILIURE issue (#5726) are both
rejected,
it is very diffcult to use SystemExit.new for EXIT_FAILURE.
% ./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 ’