[前][次][番号順一覧][スレッド一覧]

ruby-changes:55205

From: nobu <ko1@a...>
Date: Tue, 2 Apr 2019 13:36:38 +0900 (JST)
Subject: [ruby-changes:55205] nobu:r67412 (trunk): date_parse.c: name JISX0301_DEFAULT_ERA

nobu	2019-04-02 13:36:34 +0900 (Tue, 02 Apr 2019)

  New Revision: 67412

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=67412

  Log:
    date_parse.c: name JISX0301_DEFAULT_ERA

  Modified files:
    trunk/ext/date/date_parse.c
Index: ext/date/date_parse.c
===================================================================
--- ext/date/date_parse.c	(revision 67411)
+++ ext/date/date_parse.c	(revision 67412)
@@ -1213,6 +1213,7 @@ parse_iso2(VALUE str, VALUE hash) https://github.com/ruby/ruby/blob/trunk/ext/date/date_parse.c#L1213
 }
 
 #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) https://github.com/ruby/ruby/blob/trunk/ext/date/date_parse.c#L2954
 	    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]));

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]