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:
parent
ce77c3859a
commit
0e3e0f8249
1 changed files with 4 additions and 2 deletions
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;
|
||||
|
|
Loading…
Reference in a new issue