From: zn@mbf.nifty.com
To: ruby-core@ruby-lang.org
Subject: [ruby-core:91582] [Ruby trunk Feature#15609] Kernel#sleep returns Float instead of Integer
Date: Mon, 18 Feb 2019 07:02:44 +0000 (UTC) [thread overview]
Message-ID: <redmine.issue-15609.20190218070242.79140933d3e2da55@ruby-lang.org> (raw)
In-Reply-To: redmine.issue-15609.20190218070242@ruby-lang.org
Issue #15609 has been reported by znz (Kazuhiro NISHIYAMA).
----------------------------------------
Feature #15609: Kernel#sleep returns Float instead of Integer
https://bugs.ruby-lang.org/issues/15609
* Author: znz (Kazuhiro NISHIYAMA)
* Status: Open
* Priority: Normal
* Assignee:
* Target version:
----------------------------------------
`rb_f_sleep` uses `time()` internally, so it always returns Integer even if it called with Float.
https://github.com/ruby/ruby/blob/124957566f041e5c6e8f678dfaf62cae381826dc/process.c#L4840-L4857
I think returning Float is more useful than Integer.
(But I have no real use cases now.)
--
https://bugs.ruby-lang.org/
next parent reply other threads:[~2019-02-18 7:02 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <redmine.issue-15609.20190218070242@ruby-lang.org>
2019-02-18 7:02 ` zn [this message]
2019-08-13 16:56 ` [ruby-core:94327] [Ruby master Feature#15609] Kernel#sleep returns Float instead of Integer gabewild37
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.ruby-lang.org/en/community/mailing-lists/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=redmine.issue-15609.20190218070242.79140933d3e2da55@ruby-lang.org \
--to=ruby-core@ruby-lang.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).