Project

General

Profile

Misc #13502 ยป 0001-remove-Array-to_s-c-implementation.patch

colby (Colby Swandale), 04/26/2017 11:40 AM

View differences:

array.c
2135 2135
 *     [ "a", "b", "c" ].to_s     #=> "[\"a\", \"b\", \"c\"]"
2136 2136
 */
2137 2137

  
2138
static VALUE
2138
VALUE
2139 2139
rb_ary_inspect(VALUE ary)
2140 2140
{
2141 2141
    if (RARRAY_LEN(ary) == 0) return rb_usascii_str_new2("[]");
2142 2142
    return rb_exec_recursive(inspect_ary, ary, 0);
2143 2143
}
2144 2144

  
2145
VALUE
2146
rb_ary_to_s(VALUE ary)
2147
{
2148
    return rb_ary_inspect(ary);
2149
}
2150

  
2151 2145
/*
2152 2146
 *  call-seq:
2153 2147
 *     ary.to_a     -> ary
include/ruby/intern.h
62 62
VALUE rb_ary_dup(VALUE);
63 63
VALUE rb_ary_resurrect(VALUE ary);
64 64
VALUE rb_ary_to_ary(VALUE);
65
VALUE rb_ary_to_s(VALUE);
65
VALUE rb_ary_inspect(VALUE ary);
66
RUBY_ALIAS_FUNCTION(rb_ary_to_s(VALUE ary), rb_ary_inspect, (ary))
66 67
VALUE rb_ary_cat(VALUE, const VALUE *, long);
67 68
VALUE rb_ary_push(VALUE, VALUE);
68 69
VALUE rb_ary_pop(VALUE);
69
-