Method: String#chars

Defined in:
string.c

#charsArray

Returns an array of characters in str. This is a shorthand for str.each_char.to_a.

If a block is given, which is a deprecated form, works the same as each_char.

Returns:



6774
6775
6776
6777
6778
# File 'string.c', line 6774

static VALUE
rb_str_chars(VALUE str)
{
    return rb_str_enumerate_chars(str, 1);
}