mirror of
https://github.com/ruby/ruby.git
synced 2025-09-23 12:33:56 +02:00
Convert time component strings to integers more strictly
https://bugs.ruby-lang.org/issues/17485#change-89871
This commit is contained in:
parent
b017848f8a
commit
1eb8eb55c2
2 changed files with 5 additions and 4 deletions
|
@ -46,6 +46,7 @@ class TestTime < Test::Unit::TestCase
|
|||
t = Time.new(*tm, "-12:00")
|
||||
assert_equal([2001,2,28,23,59,30,-43200], [t.year, t.month, t.mday, t.hour, t.min, t.sec, t.gmt_offset], bug4090)
|
||||
assert_raise(ArgumentError) { Time.new(2000,1,1, 0,0,0, "+01:60") }
|
||||
assert_raise(ArgumentError) { Time.new(2021, 1, 1, "+09:99") }
|
||||
end
|
||||
|
||||
def test_time_add()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue