summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--time.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/time.c b/time.c
index fbccc9078d..817b6ef101 100644
--- a/time.c
+++ b/time.c
@@ -2923,6 +2923,10 @@ month_arg(VALUE arg)
{
int i, mon;
+ if (FIXNUM_P(arg)) {
+ return obj2ubits(arg, 4);
+ }
+
VALUE s = rb_check_string_type(arg);
if (!NIL_P(s) && RSTRING_LEN(s) > 0) {
mon = 0;