Skip to content

End of Life Ruby 3.2 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →

instance method

SyntaxSuggest::ExplainSyntax#why

why(miss)

Converts a missing string to an human understandable explanation.

Example:

Example
explain.why("}")
# => "Unmatched `{', missing `}' ?"
See also #missing #errors also in 4.0 · 3.4 · 3.3