summaryrefslogtreecommitdiff
path: root/time.c
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2021-11-10 18:14:14 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2021-11-10 18:14:14 +0900
commit8bcff5604b15fd29f357669dd8cb65a6618c9926 (patch)
tree170dd389a7026ccc61a9c8a6a57b727897a920c7 /time.c
parent850912b6e080f972a2d58f5011073eb511b08df4 (diff)
downloadruby-8bcff5604b15fd29f357669dd8cb65a6618c9926.tar.gz
Tentative fix of subsec to `Time.at` [Bug #18293]
Diffstat (limited to 'time.c')
-rw-r--r--time.c2
1 files changed, 1 insertions, 1 deletions
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);