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/

Unsubscribe: <mailto:ruby-core-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>