summaryrefslogtreecommitdiff
path: root/ext/date
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2019-04-02 04:36:34 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2019-04-02 04:36:34 +0000
commit7cd6706b9ab901b0b710a087b5aeb5654f219b09 (patch)
tree85fb97029612482c19102fbabbc29e2f3183fbb0 /ext/date
parentda0fceae3b3641c60823954e8198bf10a1b99c10 (diff)
date_parse.c: name JISX0301_DEFAULT_ERA
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67412 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/date')
-rw-r--r--ext/date/date_parse.c3
1 files changed, 2 insertions, 1 deletions
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]));