summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--time.c2
-rw-r--r--timev.rb2
2 files changed, 2 insertions, 2 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);
diff --git a/timev.rb b/timev.rb
index b73d8c8cc0..4d4204115d 100644
--- a/timev.rb
+++ b/timev.rb
@@ -267,7 +267,7 @@ class Time
# :include: doc/time/nsec.rdoc
# :include: doc/time/in.rdoc
#
- def self.at(time, subsec = nil, unit = :microsecond, in: nil)
+ def self.at(time, subsec = false, unit = :microsecond, in: nil)
__builtin.time_s_at(time, subsec, unit, __builtin.arg!(:in))
end