Skip to content
On this page
class · Ruby 4.0

SyntaxError

< ScriptError 1 class methods

Raised when encountering Ruby code with an invalid syntax.

Example
eval("1+1=2")

raises the exception:

SyntaxError: (eval):1: syntax error, unexpected '=', expecting $end

Class methods 1

Attributes
Read

the path that failed to parse

Ruby version changes 1

  1. 3.2