From 8bcff5604b15fd29f357669dd8cb65a6618c9926 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Wed, 10 Nov 2021 18:14:14 +0900 Subject: Tentative fix of subsec to `Time.at` [Bug #18293] --- time.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'time.c') diff --git a/time.c b/time.c index 9ecc09347c..44864ff748 100644 --- a/time.c +++ b/time.c @@ -2683,7 +2683,7 @@ time_s_at(rb_execution_context_t *ec, VALUE klass, VALUE time, VALUE subsec, VAL VALUE t; wideval_t timew; - if (!NIL_P(subsec)) { + if (subsec) { int scale = get_scale(unit); time = num_exact(time); t = num_exact(subsec); -- cgit v1.2.1