ruby-changes:52654
From: nobu <ko1@a...>
Date: Thu, 27 Sep 2018 19:22:13 +0900 (JST)
Subject: [ruby-changes:52654] nobu:r64866 (trunk): Fix messages for too small year
nobu 2018-09-27 19:22:08 +0900 (Thu, 27 Sep 2018) New Revision: 64866 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=64866 Log: Fix messages for too small year Modified files: trunk/time.c Index: time.c =================================================================== --- time.c (revision 64865) +++ time.c (revision 64866) @@ -4579,10 +4579,12 @@ time_mdump(VALUE time) https://github.com/ruby/ruby/blob/trunk/time.c#L4579 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; -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/