* [ruby-dev:50709] [Ruby trunk Bug#15420] Kernel#sleep などに負数を渡したときのエラーメッセージ
[not found] <redmine.issue-15420.20181216052311@ruby-lang.org>
@ 2018-12-16 5:23 ` shuujii
0 siblings, 0 replies; only message in thread
From: shuujii @ 2018-12-16 5:23 UTC (permalink / raw
To: ruby-dev
Issue #15420 has been reported by shuujii (Shuji KOBAYASHI).
----------------------------------------
Bug #15420: Kernel#sleep などに負数を渡したときのエラーメッセージ
https://bugs.ruby-lang.org/issues/15420
* Author: shuujii (Shuji KOBAYASHI)
* Status: Open
* Priority: Normal
* Assignee:
* Target version:
* ruby -v: ruby 2.6.0rc2 (2018-12-15 trunk 66408) [x86_64-linux]
* Backport: 2.4: UNKNOWN, 2.5: UNKNOWN
----------------------------------------
`sleep` に負数を渡した場合のエラーメッセージは以下のようになります。
~~~
$ ruby -e 'sleep(-1)'
Traceback (most recent call last):
1: from -e:1:in `<main>'
-e:1:in `sleep': time interval must be positive (ArgumentError)
~~~
しかし、0 は許容されているので "must not be negative" などのほうが良いと思います。
---Files--------------------------------
fix-negative-time-interval-message.patch (1.94 KB)
--
https://bugs.ruby-lang.org/
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2018-12-16 5:23 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <redmine.issue-15420.20181216052311@ruby-lang.org>
2018-12-16 5:23 ` [ruby-dev:50709] [Ruby trunk Bug#15420] Kernel#sleep などに負数を渡したときのエラーメッセージ shuujii
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).