Maintenance Ruby 3.3 gets fixes, but no new features. Switch to Ruby 4.0 →
class · Ruby 3.3
RegexpError
Raised when given an invalid regexp expression.
Example
Regexp.new("?")
raises the exception:
RegexpError: target of repeat operator is not specified: /?/