`Time.rfc3339` on master (tested at b126827) reports an invalid string as an invalid xmlschema. ## Steps to reproduce ```ruby require "bundler/inline" gemfile(true) do source "https://rubygems.org" gem "time", github: "ruby/time" end require "time" Time.rfc3339("foobar") ``` ## Expected behavior The `ArgumentError` message names RFC 3339, the format `Time.rfc3339` is documented to parse. ## Actual behavior ``` lib/time.rb:677:in 'Time._xmlschema': invalid xmlschema format: "foobar" (ArgumentError) ``` The message is hardcoded in the `_xmlschema` helper the pattern is handed to: https://github.com/ruby/time/blob/b126827a3136b82e03f9785694103f5319ba6c13/lib/time.rb#L677 ## References - `Time.iso8601` raises the same message, which is consistent with its documentation: `iso8601` is an explicit alias of `xmlschema` (https://github.com/ruby/time/blob/b126827a3136b82e03f9785694103f5319ba6c13/lib/time.rb#L639) - `Time.rfc3339` is a separate method documented as parsing RFC 3339 (https://github.com/ruby/time/blob/b126827a3136b82e03f9785694103f5319ba6c13/lib/time.rb#L657), so the format name in the message does not match what was parsed
Activity
jeremyevans commentedon Aug 6, 2026
Thank you for the report. Note that I already submitted #79 to fix this.
yahonda commentedon Aug 6, 2026
Thanks. I'm closing this issue and following #79 .