Skip to content

Commit 9b15e52

Browse files
committed
Fix incorrect argc2 decrement in datetime_s_iso8601 function
Replace the decrement (argc2--) with an increment (argc2++) for the correct number of arguments when opt is provided.
1 parent c2d9cc2 commit 9b15e52

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/date/date_core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8485,7 +8485,7 @@ datetime_s_iso8601(int argc, VALUE *argv, VALUE klass)
84858485
VALUE argv2[2], hash;
84868486
argv2[0] = str;
84878487
argv2[1] = opt;
8488-
if (!NIL_P(opt)) argc2--;
8488+
if (!NIL_P(opt)) argc2++;
84898489
hash = date_s__iso8601(argc2, argv2, klass);
84908490
return dt_new_by_frags(klass, hash, sg);
84918491
}

0 commit comments

Comments
 (0)