Project

General

Profile

Bug #13130 ยป doc_array_join.patch

stomar (Marcus Stollsteimer), 01/14/2017 08:38 PM

View differences:

array.c
2075 2075
 *
2076 2076
 *  Returns a string created by converting each element of the array to
2077 2077
 *  a string, separated by the given +separator+.
2078
 *  If the +separator+ is +nil+, it uses current $,.
2079
 *  If both the +separator+ and $, are nil, it uses empty string.
2078
 *  If the +separator+ is +nil+, it uses current <code>$,</code>.
2079
 *  If both the +separator+ and <code>$,</code> are +nil+,
2080
 *  it uses an empty string.
2080 2081
 *
2081 2082
 *     [ "a", "b", "c" ].join        #=> "abc"
2082 2083
 *     [ "a", "b", "c" ].join("-")   #=> "a-b-c"
2084
 *
2085
 *  For nested arrays, join is applied recursively:
2086
 *
2087
 *     [ "a", [1, 2, [:x, :y]], "b" ].join("-")   #=> "a-1-2-x-y-b"
2083 2088
 */
2084 2089

  
2085 2090
static VALUE