summaryrefslogtreecommitdiff
path: root/time.c
diff options
context:
space:
mode:
authorKoichi Sasada <ko1@atdot.net>2021-11-13 07:44:46 +0900
committerKoichi Sasada <ko1@atdot.net>2021-11-15 15:58:56 +0900
commit2a3d5d661ce2cadad50aa5d72b54e134da54f5f3 (patch)
tree2b20bf1f12d64ec7076106fa5039bdd4d6aef96d /time.c
parentdde010c97432de8ac2336eeeb4f6b99daf832b61 (diff)
downloadruby-2a3d5d661ce2cadad50aa5d72b54e134da54f5f3.tar.gz
Use `Primitive.mandatory_only?` for `Time.at`
Diffstat (limited to 'time.c')
-rw-r--r--time.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/time.c b/time.c
index 44864ff748..9c23089cfd 100644
--- a/time.c
+++ b/time.c
@@ -2708,6 +2708,12 @@ time_s_at(rb_execution_context_t *ec, VALUE klass, VALUE time, VALUE subsec, VAL
return t;
}
+static VALUE
+time_s_at1(rb_execution_context_t *ec, VALUE klass, VALUE time)
+{
+ return time_s_at(ec, klass, time, Qfalse, ID2SYM(id_microsecond), Qnil);
+}
+
static const char months[][4] = {
"jan", "feb", "mar", "apr", "may", "jun",
"jul", "aug", "sep", "oct", "nov", "dec",