Method: U::String#lines

Defined in:
ext/u/rb_u_string_each_line.c

#lines(separator = $/) ⇒ Array<U::String>

Returns the lines of the receiver, inheriting any taint and untrust.

If SEPARATOR is nil, yields self. If SEPARATOR is #empty?, separates each line (paragraph) by two or more U+000A LINE FEED characters.

Parameters:

Returns:



136
137
138
139
140
141
142
# File 'ext/u/rb_u_string_each_line.c', line 136

VALUE
rb_u_string_lines(int argc, VALUE *argv, VALUE self)
{
        struct yield_array y = YIELD_ARRAY_INIT;
        each(argc, argv, self, &y.yield);
        return y.array;
}