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

19 messages 2011/12/03
[#44929] [Backport93 - Backport #5702] backport r33935 — Tomoyuki Chikanaga <nagachika00@...> 2011/12/05

[#44931] Re: [Backport93 - Backport #5702] backport r33935 — Yusuke Endoh <mame@...> 2011/12/05

遠藤です。

[#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:44952] [ruby-trunk - Bug #5728] SystemExit.new(bool, message)

From: Motohiro KOSAKI <kosaki.motohiro@...>
Date: 2011-12-08 11:29:53 UTC
List: ruby-dev #44952
Issue #5728 has been updated by Motohiro KOSAKI.


> I think SystemExit.new should accept a bool.

We have two choice and both are a lot of confusable.

1) true => EXIT_SUCCESS, false => EXIT_FAILURE
   People may dislike it becuase true mapped 0 and false mapped 1.
2) true => EXIT_FAILURE, false => EXIT_SUCCESS
   People also may dislike it. Because true usually isn't used for failure.

As far as EXIT_SUCCESS==0, I doubt we can make natural conversion.




----------------------------------------
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