Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/time.rb
Original file line number Diff line number Diff line change
Expand Up @@ -668,15 +668,15 @@ def rfc3339(time)
private

if RUBY_VERSION >= "3.2"
def _xmlschema(pattern, time)
def _xmlschema(pattern, time) # :nodoc:
if pattern.match?(time)
new(time)
else
raise ArgumentError.new("invalid xmlschema format: #{time.inspect}")
end
end
else
def _xmlschema(pattern, time)
def _xmlschema(pattern, time) # :nodoc:
if pattern =~ time
year = $1.to_i
mon = $2.to_i
Expand Down