1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Fix messages for too small year

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64866 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2018-09-27 10:22:08 +00:00
parent ce77c3859a
commit 0e3e0f8249

6
time.c
View file

@ -4579,10 +4579,12 @@ time_mdump(VALUE time)
if (FIXNUM_P(vtm.year)) {
year = FIX2LONG(vtm.year);
if (year < 1900 || 1900+0xffff < year)
rb_raise(rb_eArgError, "year too big to marshal: %ld UTC", year);
rb_raise(rb_eArgError, "year too %s to marshal: %ld UTC",
(year < 1900 ? "small" : "big"), year);
}
else {
rb_raise(rb_eArgError, "year too big to marshal");
rb_raise(rb_eArgError, "year too %s to marshal: %"PRIsVALUE" UTC",
(le(vtm.year, INT2FIX(1900)) ? "small" : "big"), vtm.year);
}
subsecx = vtm.subsecx;