summaryrefslogtreecommitdiff
path: root/string.c
diff options
context:
space:
mode:
Diffstat (limited to 'string.c')
-rw-r--r--string.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/string.c b/string.c
index 54a89f3565..7c70b0a4c6 100644
--- a/string.c
+++ b/string.c
@@ -2935,7 +2935,9 @@ rb_str_concat_multi(int argc, VALUE *argv, VALUE str)
{
str_modifiable(str);
- if (argc > 0) {
+ if (argc == 1) {
+ return rb_str_concat(str, argv[0]);
+ } else if (argc > 1) {
int i;
VALUE arg_str = rb_str_tmp_new(0);
rb_enc_copy(arg_str, str);