From 2735da2039b9e441e41b11b606ba362db350a658 Mon Sep 17 00:00:00 2001 From: "S.H" Date: Fri, 24 Jul 2020 20:17:31 +0900 Subject: Fix Time#to_a behavior with timezone [Bug #17046] --- test/ruby/test_time_tz.rb | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'test/ruby') diff --git a/test/ruby/test_time_tz.rb b/test/ruby/test_time_tz.rb index 4cf1fcbf4d..c9c2b77115 100644 --- a/test/ruby/test_time_tz.rb +++ b/test/ruby/test_time_tz.rb @@ -661,6 +661,12 @@ module TestTimeTZ::WithTZ assert_equal(utc, t.to_i) end + def subtest_to_a(time_class, tz, tzarg, tzname, abbr, utc_offset) + t = time_class.new(2018, 9, 1, 12, 0, 0, tzarg) + ary = t.to_a + assert_equal(ary, [t.sec, t.min, t.hour, t.mday, t.mon, t.year, t.wday, t.yday, t.isdst, t.zone]) + end + def subtest_marshal(time_class, tz, tzarg, tzname, abbr, utc_offset) t = time_class.new(2018, 9, 1, 12, 0, 0, tzarg) t2 = Marshal.load(Marshal.dump(t)) -- cgit v1.2.3