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
This commit is contained in:
parent
c85040d4d0
commit
8d23c8bf3b
@ -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),
|
* ext/date/date_core.c (d_lite_jisx0301, iso8601_timediv),
|
||||||
(dt_lite_jisx0301): format by the format string in local buffer
|
(dt_lite_jisx0301): format by the format string in local buffer
|
||||||
|
@ -8350,8 +8350,8 @@ dt_lite_iso8601(int argc, VALUE *argv, VALUE self)
|
|||||||
if (argc >= 1)
|
if (argc >= 1)
|
||||||
n = NUM2LONG(argv[0]);
|
n = NUM2LONG(argv[0]);
|
||||||
|
|
||||||
return f_add(strftimev("%Y-%m-%d", self, set_tmx),
|
return rb_str_append(strftimev("%Y-%m-%d", self, set_tmx),
|
||||||
iso8601_timediv(self, n));
|
iso8601_timediv(self, n));
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user