End of Life Ruby 3.2 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
class method
Ripper.dedent_string
Ripper.dedent_string(input, width) → Integer
parse.c
View on GitHub ↗
static VALUE
parser_dedent_string(VALUE self, VALUE input, VALUE width)
{
int wid, col;
StringValue(input);
wid = NUM2UINT(width);
col = dedent_string(input, wid);
return INT2NUM(col);
}
USE OF RIPPER LIBRARY ONLY.
Strips up to width leading whitespaces from input, and returns the stripped column width.