summaryrefslogtreecommitdiff
path: root/timev.rb
diff options
context:
space:
mode:
Diffstat (limited to 'timev.rb')
-rw-r--r--timev.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/timev.rb b/timev.rb
index a475fc482d..675b54faf6 100644
--- a/timev.rb
+++ b/timev.rb
@@ -268,7 +268,11 @@ class Time
# :include: doc/time/in.rdoc
#
def self.at(time, subsec = false, unit = :microsecond, in: nil)
- Primitive.time_s_at(time, subsec, unit, Primitive.arg!(:in))
+ if Primitive.mandatory_only?
+ Primitive.time_s_at1(time)
+ else
+ Primitive.time_s_at(time, subsec, unit, Primitive.arg!(:in))
+ end
end
# Returns a new \Time object based the on given arguments.