instance method
Symbol#[]
(::int start, ?::int length) -> ::String?
(::range[::int?] range) -> ::String?
(::Regexp regexp, ?::MatchData::capture backref) -> ::String?
(::String substring) -> ::String?
symbol[index] → string or nil
symbol[start, length] → string or nil
symbol[range] → string or nil
symbol[regexp, capture = 0] → string or nil
symbol[substring] → string or nil
string.c
View on GitHub ↗
static VALUE
sym_aref(int argc, VALUE *argv, VALUE sym)
{
return rb_str_aref_m(argc, argv, rb_sym2str(sym));
}
Equivalent to symbol.to_s[]; see String#[].