diff options
author | Samuel Williams <[email protected]> | 2025-02-25 16:37:21 +1300 |
---|---|---|
committer | GitHub <[email protected]> | 2025-02-25 16:37:21 +1300 |
commit | d32fa5283f1197f2dfbd1f22d06515035095ecee (patch) | |
tree | cc9a7327b045493801f4e1605f712d5988461311 /spec/ruby/optional | |
parent | 3198b46a36feddabe5bbdcae253e5895e31f182a (diff) |
Prefer `0.000001` over `0.000001f` for timeout calculations. (#12803)
Notes
Notes:
Merged-By: ioquatix <[email protected]>
Diffstat (limited to 'spec/ruby/optional')
-rw-r--r-- | spec/ruby/optional/capi/ext/io_spec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/spec/ruby/optional/capi/ext/io_spec.c b/spec/ruby/optional/capi/ext/io_spec.c index 3b7e8c4481..cc440e6b07 100644 --- a/spec/ruby/optional/capi/ext/io_spec.c +++ b/spec/ruby/optional/capi/ext/io_spec.c @@ -241,7 +241,7 @@ VALUE io_spec_rb_wait_for_single_fd(VALUE self, VALUE io, VALUE events, VALUE se #ifdef RUBY_VERSION_IS_3_0 VALUE timeout = Qnil; if (!NIL_P(secs)) { - timeout = rb_float_new((double)FIX2INT(secs) + (0.000001f * FIX2INT(usecs))); + timeout = rb_float_new((double)FIX2INT(secs) + (0.000001 * FIX2INT(usecs))); } VALUE result = rb_io_wait(io, events, timeout); if (result == Qfalse) return INT2FIX(0); |