summaryrefslogtreecommitdiff
path: root/test/ruby
diff options
context:
space:
mode:
authorS.H <gamelinks007@gmail.com>2020-07-24 20:17:31 +0900
committerGitHub <noreply@github.com>2020-07-24 20:17:31 +0900
commit2735da2039b9e441e41b11b606ba362db350a658 (patch)
tree0a87482694977d200fd88523d04c57dba9c84dde /test/ruby
parent922fe4da3f6a2ecef5f89e6b7dbb760b7afe2314 (diff)
Fix Time#to_a behavior with timezone [Bug #17046]
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/3355 Merged-By: nobu <nobu@ruby-lang.org>
Diffstat (limited to 'test/ruby')
-rw-r--r--test/ruby/test_time_tz.rb6
1 files changed, 6 insertions, 0 deletions
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))