diff options
Diffstat (limited to 'ext')
-rw-r--r-- | ext/date/date_parse.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ext/date/date_parse.c b/ext/date/date_parse.c index 765f9a7292..29dbb239bb 100644 --- a/ext/date/date_parse.c +++ b/ext/date/date_parse.c @@ -2848,7 +2848,9 @@ rfc2822_cb(VALUE m, VALUE hash) s[i] = rb_reg_nth_match(i, m); } - set_hash("wday", INT2FIX(day_num(s[1]))); + if (!NIL_P(s[1])) { + set_hash("wday", INT2FIX(day_num(s[1]))); + } set_hash("mday", str2num(s[2])); set_hash("mon", INT2FIX(mon_num(s[3]))); y = str2num(s[4]); |