зеркало из https://github.com/github/ruby.git
[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:
Родитель
9f59a2bd87
Коммит
c8cddac45c
|
@ -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*"
|
||||
|
|
Загрузка…
Ссылка в новой задаче