Skip to content
On this page

Maintenance Ruby 3.4 gets fixes, but no new features. Switch to Ruby 4.0 →

class · Ruby 3.4

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