inspect()
public
Create a printable version of array.
Show source
/*
* call-seq:
* array.inspect -> string
*
* Create a printable version of <i>array</i>.
*/
static VALUE
rb_ary_inspect(ary)
VALUE ary;
{
if (RARRAY(ary)->len == 0) return rb_str_new2("[]");
if (rb_inspecting_p(ary)) return rb_str_new2("[...]");
return rb_protect_inspect(inspect_ary, ary, 0);
}