diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2023-01-01 16:39:00 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2023-01-01 16:39:00 +0900 |
commit | 542e984d82fa25098eb15398d716d907acc52b93 (patch) | |
tree | 5b6644f4bfcb61df3922c280dc58512df4b1bb3f /test/ruby/test_time.rb | |
parent | f527a0911d5ff0476152a3e3c9bcd2247ead5636 (diff) |
[Bug #19292] Re-initialize tm when wday or yday is not set
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/7051
Diffstat (limited to 'test/ruby/test_time.rb')
-rw-r--r-- | test/ruby/test_time.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/test/ruby/test_time.rb b/test/ruby/test_time.rb index 0977fea55f..8274dbbc83 100644 --- a/test/ruby/test_time.rb +++ b/test/ruby/test_time.rb @@ -54,7 +54,8 @@ class TestTime < Test::Unit::TestCase assert_raise_with_message(ArgumentError, msg) { Time.new(2021, 1, "+09:99") } assert_raise_with_message(ArgumentError, msg) { Time.new(2021, "+09:99") } - assert_equal([0, 0, 0, 2, 1, 2000], Time.new(2000, 1, 1, 24, 0, 0, "-00:00").to_a[0, 6]) + assert_equal([0, 0, 0, 1, 1, 2000, 6, 1, false, "UTC"], Time.new(2000, 1, 1, 0, 0, 0, "-00:00").to_a) + assert_equal([0, 0, 0, 2, 1, 2000, 0, 2, false, "UTC"], Time.new(2000, 1, 1, 24, 0, 0, "-00:00").to_a) end def test_new_from_string |