[#44925] [Backport93 - Backport #5702][Open] backport r33935 — Yusuke Endoh <mame@...>

19 messages 2011/12/03

[#44940] Re: [ruby-cvs:41134] naruse:r33956 (trunk): Comment out tests which fails with GDBM-DBM compat mode. — Tanaka Akira <akr@...>

2011/12/6 <naruse@ruby-lang.org>:

9 messages 2011/12/05
[#44941] Re: [ruby-cvs:41134] naruse:r33956 (trunk): Comment out tests which fails with GDBM-DBM compat mode. — KOSAKI Motohiro <kosaki.motohiro@...> 2011/12/05

2011年12月5日16:56 Tanaka Akira <akr@fsij.org>:

[#44942] Re: [ruby-cvs:41134] naruse:r33956 (trunk): Comment out tests which fails with GDBM-DBM compat mode. — KOSAKI Motohiro <kosaki.motohiro@...> 2011/12/05

> おかしいな。gdbmは勝手にcreateフラグを立ててしまうので当該2つの

[#44985] [ruby-trunk - Bug #5757][Open] main threadがreadやselectで待っていると、^C でなかなか死なない — Yui NARUSE <naruse@...>

12 messages 2011/12/13

[#45021] [ruby-trunk - Bug #5786][Open] LoadError: cannot load such file -- openssl — Kazuhiro NISHIYAMA <redmine@...>

11 messages 2011/12/21

[#45057] [ruby-trunk - Feature #5820][Assigned] Merge Onigmo to Ruby 2.0 — Yui NARUSE <naruse@...>

21 messages 2011/12/28

[ruby-dev:44955] [ruby-trunk - Bug #5728] SystemExit.new(bool, message)

From: Nobuyoshi Nakada <nobu@...>
Date: 2011-12-08 11:58:18 UTC
List: ruby-dev #44955
Issue #5728 has been updated by Nobuyoshi Nakada.


=begin
I don't think we have two.

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. 
=end

----------------------------------------
Bug #5728: SystemExit.new(bool, message)
http://redmine.ruby-lang.org/issues/5728

Author: Akira Tanaka
Status: Open
Priority: Normal
Assignee: 
Category: 
Target version: 
ruby -v: ruby 2.0.0dev (2011-12-08 trunk 33981) [x86_64-linux]


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 `<main>'
  % ./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 `<main>'

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

I think SystemExit.new should accept a bool.




-- 
http://redmine.ruby-lang.org

In This Thread