Skip to content

Commit

Permalink
Make RFC2822 regexp linear
Browse files Browse the repository at this point in the history
  • Loading branch information
nobu authored and hsbt committed Mar 24, 2023
1 parent b57db51 commit 3dce6f7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/time.rb
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,7 @@ def rfc2822(date)
(\d{2,})\s+
(\d{2})\s*
:\s*(\d{2})
(?:\s*:\s*(\d{2}))?\s+
(?:\s*:\s*(\d\d))?\s+
([+-]\d{4}|
UT|GMT|EST|EDT|CST|CDT|MST|MDT|PST|PDT|[A-IK-Z])/ix =~ date
# Since RFC 2822 permit comments, the regexp has no right anchor.
Expand Down

0 comments on commit 3dce6f7

Please sign in to comment.