diff options
| author | cremno <[email protected]> | 2014-04-22 00:43:52 +0200 |
|---|---|---|
| committer | cremno <[email protected]> | 2014-04-27 22:33:22 +0200 |
| commit | 91c22f32f4d5afbd53efc16933ca8cd78586b1a3 (patch) | |
| tree | 2b850534d9b5261b49ab8f8c8153a4838961a230 /src/array.c | |
| parent | bbc237044d0fb1792dff8c5d2466f4e644821239 (diff) | |
| download | mruby-91c22f32f4d5afbd53efc16933ca8cd78586b1a3.tar.gz mruby-91c22f32f4d5afbd53efc16933ca8cd78586b1a3.zip | |
rename `mrb_str_buf_append` to `mrb_str_cat_str`
The new name is better and less confusing, because:
- `mrb_str_append` calls `mrb_str_to_str` and this function doesn't
- `mrb_str_buf_append` _is_ `mrb_str_cat` for `mrb_value` strings
Diffstat (limited to 'src/array.c')
| -rw-r--r-- | src/array.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/array.c b/src/array.c index 403a63807..febc3a7a8 100644 --- a/src/array.c +++ b/src/array.c @@ -946,7 +946,7 @@ join_ary(mrb_state *mrb, mrb_value ary, mrb_value sep, mrb_value list) for (i=0; i<RARRAY_LEN(ary); i++) { if (i > 0 && !mrb_nil_p(sep)) { - mrb_str_buf_append(mrb, result, sep); + mrb_str_cat_str(mrb, result, sep); } val = RARRAY_PTR(ary)[i]; @@ -958,7 +958,7 @@ join_ary(mrb_state *mrb, mrb_value ary, mrb_value sep, mrb_value list) case MRB_TT_STRING: str_join: - mrb_str_buf_append(mrb, result, val); + mrb_str_cat_str(mrb, result, val); break; default: |
