diff options
author | Yusuke Endoh <mame@ruby-lang.org> | 2021-11-12 12:15:25 +0900 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2021-11-16 20:56:56 +0900 |
commit | 489c8cebf575741d62effd0d212f1319beff3c40 (patch) | |
tree | c2af29ebb3ca82e7aa5184c7979acd600daaff5c /ext/racc/cparse | |
parent | 5bff4cd56cdaf8b4dc6d020112674e4b4f9cd956 (diff) |
[ruby/date] Add length limit option for methods that parses date strings
`Date.parse` now raises an ArgumentError when a given date string is
longer than 128. You can configure the limit by giving `limit` keyword
arguments like `Date.parse(str, limit: 1000)`. If you pass `limit: nil`,
the limit is disabled.
Not only `Date.parse` but also the following methods are changed.
* Date._parse
* Date.parse
* DateTime.parse
* Date._iso8601
* Date.iso8601
* DateTime.iso8601
* Date._rfc3339
* Date.rfc3339
* DateTime.rfc3339
* Date._xmlschema
* Date.xmlschema
* DateTime.xmlschema
* Date._rfc2822
* Date.rfc2822
* DateTime.rfc2822
* Date._rfc822
* Date.rfc822
* DateTime.rfc822
* Date._jisx0301
* Date.jisx0301
* DateTime.jisx0301
https://github.com/ruby/date/commit/3959accef8
Diffstat (limited to 'ext/racc/cparse')
0 files changed, 0 insertions, 0 deletions