diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-01-05 03:18:18 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-01-05 03:18:18 +0000 |
commit | 0d8ad1a96be13d90c314774867418bbdd1719c4d (patch) | |
tree | 62613c13748526e0094f8a81d1c3c3fbbb225db2 /file.c | |
parent | 87fe4480919baaa9f0a37b9444912bae98220395 (diff) | |
download | ruby-0d8ad1a96be13d90c314774867418bbdd1719c4d.tar.gz |
* file.c (rb_file_join): separator is appended by array length - 1
times. patched by Benoit Daloze [ruby-core:41901] [Bug #5841]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34215 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'file.c')
-rw-r--r-- | file.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -3825,7 +3825,7 @@ rb_file_join(VALUE ary, VALUE sep) } if (!NIL_P(sep)) { StringValue(sep); - len += RSTRING_LEN(sep) * RARRAY_LEN(ary) - 1; + len += RSTRING_LEN(sep) * (RARRAY_LEN(ary) - 1); } result = rb_str_buf_new(len); OBJ_INFECT(result, ary); |