From 7cd6706b9ab901b0b710a087b5aeb5654f219b09 Mon Sep 17 00:00:00 2001 From: nobu Date: Tue, 2 Apr 2019 04:36:34 +0000 Subject: date_parse.c: name JISX0301_DEFAULT_ERA git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67412 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/date/date_parse.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'ext/date/date_parse.c') diff --git a/ext/date/date_parse.c b/ext/date/date_parse.c index c2c19825d5..ae3e90a3ae 100644 --- a/ext/date/date_parse.c +++ b/ext/date/date_parse.c @@ -1213,6 +1213,7 @@ parse_iso2(VALUE str, VALUE hash) } #define JISX0301_ERA_INITIALS "mtsh" +#define JISX0301_DEFAULT_ERA 'H' /* obsolete */ static int gengo(int c) @@ -2953,7 +2954,7 @@ jisx0301_cb(VALUE m, VALUE hash) s[i] = rb_reg_nth_match(i, m); } - ep = gengo(NIL_P(s[1]) ? 'h' : *RSTRING_PTR(s[1])); + ep = gengo(NIL_P(s[1]) ? JISX0301_DEFAULT_ERA : *RSTRING_PTR(s[1])); set_hash("year", f_add(str2num(s[2]), INT2FIX(ep))); set_hash("mon", str2num(s[3])); set_hash("mday", str2num(s[4])); -- cgit v1.2.3