Forum: Ruby-dev [Closed] parameters equals to 0 (== lowerbound) should not accept.

9361878d459f1709feec780518946ee5?d=identicon&s=25 unknown (Guest)
on 2014-02-06 20:22
(Received via mailing list)
Issue #9493 has been updated by Yui NARUSE.

Status changed from Open to Closed
% Done changed from 0 to 100

Applied in changeset r44868.

----------
merge revision(s) 44861,44862: [Backport #9493]

  * gc.c (get_envparam_int): don't accept a value equals to lowerbound
    (changed by last commit) because "" or "foo" (not a number) strings
    are parsed as 0. They should be rejected.

  * gc.c (get_envparam_double): ditto.

  * gc.c (get_envparam_int): accept a value equals to lowerbound.

  * gc.c (get_envparam_int): correct warning messsages.

  * gc.c (get_envparam_double): ditto.

----------------------------------------
Backport #9493: parameters equals to 0 (== lowerbound) should not
accept.
https://bugs.ruby-lang.org/issues/9493#change-44998

* Author: Koichi Sasada
* Status: Closed
* Priority: Normal
* Assignee:
* Category:
* Target version:
* ruby -v: 2.1
----------------------------------------
Please backport r44861, r44862.

さっきバックポートしてもらったものに、FOO=0 として、
0 を受け取れるようにしてみたんですが、
FOO=(空)や FOO=xxx のように数値以外が入ってきても 0 になっちゃって、
誤入力が増えるので、0 を指定するべきではないと思い修正しました。

あと、r44862 は警告メッセージが間違っていたので修正です。
This topic is locked and can not be replied to.