summaryrefslogtreecommitdiff
path: root/time.c
diff options
context:
space:
mode:
Diffstat (limited to 'time.c')
-rw-r--r--time.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/time.c b/time.c
index 6fa4047e29..9ecc09347c 100644
--- a/time.c
+++ b/time.c
@@ -2678,13 +2678,13 @@ get_scale(VALUE unit)
}
static VALUE
-time_s_at(rb_execution_context_t *ec, VALUE klass, VALUE time, VALUE subsec, VALUE unit, VALUE zone, VALUE nosubsec, VALUE nounit)
+time_s_at(rb_execution_context_t *ec, VALUE klass, VALUE time, VALUE subsec, VALUE unit, VALUE zone)
{
VALUE t;
wideval_t timew;
- if (!RTEST(nosubsec)) {
- int scale = !RTEST(nounit) ? get_scale(unit) : 1000000;
+ if (!NIL_P(subsec)) {
+ int scale = get_scale(unit);
time = num_exact(time);
t = num_exact(subsec);
timew = wadd(rb_time_magnify(v2w(time)), wmulquoll(v2w(t), TIME_SCALE, scale));