Files
ruby/lib
youdie006 2a0323f26b [ruby/time] Only allow "T" or a space as the RFC 3339 separator
Time.rfc3339's pattern used [T\s], so it accepted a tab, newline,
vertical tab, form feed or carriage return between the date and the
time. Time.xmlschema's pattern has a bare T.

RFC 3339 section 5.6 defines the separator as "T" and only notes that an
application may use a space for readability. The other \s characters are
not permitted by either.

Since Ruby 3.2 the pattern also disagrees with what the code does with
the string it matched. _xmlschema hands it to Time.new, which rejects
those five characters, so the documented ArgumentError never gets raised
and Time.new's internal message escapes instead:

  Time.rfc3339("2011-10-05\t22:26:12Z")
  #=> ArgumentError: "+HH:MM", "-HH:MM", "UTC" or "A".."I","K".."Z"
  #   expected for utc_offset: 22:26:12Z

Narrowing the class to [T ] makes the pattern agree with the RFC, with
Time.xmlschema, and with what _xmlschema can actually parse, so these
inputs now raise "invalid rfc3339 format:" as documented.

https://github.com/ruby/time/commit/03c5cc82d1
2026-09-11 00:47:31 +00:00
..
2026-08-04 23:32:23 +00:00
2026-08-27 09:27:53 +09:00
2025-10-31 00:14:23 +00:00
2026-06-02 05:17:51 +00:00
2025-12-10 07:08:05 +00:00
2026-02-12 20:35:18 +01:00
2025-12-10 06:43:06 +00:00
2024-11-12 11:53:01 +09:00
2026-06-22 01:17:19 +00:00
2026-08-27 09:27:53 +09:00
2024-12-13 00:50:02 +00:00
2024-12-17 06:47:52 +00:00
…
2024-03-28 11:44:45 +09:00
2025-11-10 10:03:07 +00:00