diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2019-05-04 22:00:22 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2019-05-04 22:00:22 +0900 |
commit | b9e52db28398c5a792ae16730243af764c869bcd (patch) | |
tree | af06b01a353cc3b53f4543a38a1a13d1cc297c87 | |
parent | 7d30cd47c4e9e27461d3906e5740daa02dac22ca (diff) | |
download | ruby-b9e52db28398c5a792ae16730243af764c869bcd.tar.gz |
Add a pathologic check
-rw-r--r-- | time.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -4627,6 +4627,9 @@ time_isdst(VALUE time) GetTimeval(time, tobj); MAKE_TM(time, tobj); + if (tobj->vtm.isdst == VTM_ISDST_INITVAL) { + rb_raise(rb_eRuntimeError, "isdst is not set yet"); + } return tobj->vtm.isdst ? Qtrue : Qfalse; } |