ruby-changes:42169
From: nobu <ko1@a...>
Date: Thu, 24 Mar 2016 12:43:31 +0900 (JST)
Subject: [ruby-changes:42169] nobu:r54243 (trunk): date_core.c: append strings
nobu 2016-03-24 12:43:28 +0900 (Thu, 24 Mar 2016) New Revision: 54243 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=54243 Log: date_core.c: append strings * ext/date/date_core.c (dt_lite_iso8601): strftimev() always returns a String, so append them directly. Modified files: trunk/ChangeLog trunk/ext/date/date_core.c Index: ChangeLog =================================================================== --- ChangeLog (revision 54242) +++ ChangeLog (revision 54243) @@ -1,4 +1,7 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 -Thu Mar 24 12:43:05 2016 Nobuyoshi Nakada <nobu@r...> +Thu Mar 24 12:43:26 2016 Nobuyoshi Nakada <nobu@r...> + + * ext/date/date_core.c (dt_lite_iso8601): strftimev() always + returns a String, so append them directly. * ext/date/date_core.c (d_lite_jisx0301, iso8601_timediv), (dt_lite_jisx0301): format by the format string in local buffer Index: ext/date/date_core.c =================================================================== --- ext/date/date_core.c (revision 54242) +++ ext/date/date_core.c (revision 54243) @@ -8350,8 +8350,8 @@ dt_lite_iso8601(int argc, VALUE *argv, V https://github.com/ruby/ruby/blob/trunk/ext/date/date_core.c#L8350 if (argc >= 1) n = NUM2LONG(argv[0]); - return f_add(strftimev("%Y-%m-%d", self, set_tmx), - iso8601_timediv(self, n)); + return rb_str_append(strftimev("%Y-%m-%d", self, set_tmx), + iso8601_timediv(self, n)); } /* -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/