summaryrefslogtreecommitdiff
path: root/time.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-09-27 10:22:08 (GMT)
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-09-27 10:22:08 (GMT)
commit0e3e0f824966c9c05870b2dbac88c0a8eef2b579 (patch)
treea26cbafb85010cfdc156155cedf2032625c0197b /time.c
parentce77c3859ad68a08b6a2104707d3888a6ce528d1 (diff)
Fix messages for too small year
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64866 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'time.c')
-rw-r--r--time.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/time.c b/time.c
index 3543454..ffa125f 100644
--- a/time.c
+++ b/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;