mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
[ruby/date] Use possessive match
Reduce backtracks at the same character classes arounding an optional pattern. https://github.com/ruby/date/commit/1fd15f7c49
This commit is contained in:
parent
9f59a2bd87
commit
c8cddac45c
1 changed files with 2 additions and 2 deletions
|
@ -922,8 +922,8 @@ parse_us(VALUE str, VALUE hash)
|
|||
COM_FPT
|
||||
#endif
|
||||
"(?:"
|
||||
"\\s*,?"
|
||||
"\\s*"
|
||||
"\\s*+,?"
|
||||
"\\s*+"
|
||||
#ifndef TIGHT_PARSER
|
||||
"(c(?:e|\\.e\\.)|b(?:ce|\\.c\\.e\\.)|a(?:d|\\.d\\.)|b(?:c|\\.c\\.))?"
|
||||
"\\s*"
|
||||
|
|
Loading…
Add table
Reference in a new issue