summaryrefslogtreecommitdiff
path: root/time.c
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 /time.c
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 'time.c')
-rw-r--r--time.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/time.c b/time.c
index f00e0cddff..70725b7fe0 100644
--- a/time.c
+++ b/time.c
@@ -4867,7 +4867,7 @@ time_to_a(VALUE time)
struct time_object *tobj;
GetTimeval(time, tobj);
- MAKE_TM(time, tobj);
+ MAKE_TM_ENSURE(time, tobj, tobj->vtm.yday != 0);
return rb_ary_new3(10,
INT2FIX(tobj->vtm.sec),
INT2FIX(tobj->vtm.min),