зеркало из https://github.com/github/ruby.git
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:
Родитель
ce77c3859a
Коммит
0e3e0f8249
6
time.c
6
time.c
|
@ -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;
|
||||
|
|
Загрузка…
Ссылка в новой задаче