diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-03-24 03:43:28 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-03-24 03:43:28 +0000 |
commit | 29d0a13e1022b2e7d331c23132bf6c54a9f8330e (patch) | |
tree | 6f52ea135dcc3663befbbaad54c90391b34321e0 | |
parent | ad393b9be8e094ff9c71146bc65ee7cb7adbddc1 (diff) | |
download | ruby-29d0a13e1022b2e7d331c23132bf6c54a9f8330e.tar.gz |
date_core.c: append strings
* ext/date/date_core.c (dt_lite_iso8601): strftimev() always
returns a String, so append them directly.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54243 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | ext/date/date_core.c | 4 |
2 files changed, 6 insertions, 3 deletions
@@ -1,4 +1,7 @@ -Thu Mar 24 12:43:05 2016 Nobuyoshi Nakada <nobu@ruby-lang.org> +Thu Mar 24 12:43:26 2016 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * 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 diff --git a/ext/date/date_core.c b/ext/date/date_core.c index dbe8cb97da..a863f9c17c 100644 --- a/ext/date/date_core.c +++ b/ext/date/date_core.c @@ -8350,8 +8350,8 @@ dt_lite_iso8601(int argc, VALUE *argv, VALUE self) 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)); } /* |