Skip to content

Missing spaces/punctuation in SyntaxError message. #225

@callmesangio

Description

@callmesangio

Hi all,

with the following simple snippet of Ruby code:

def x.y.z
end

the interpreter raises a SyntaxError, whose message is made up of two sentences with no spaces or punctuation in between (see line no. 2 of the output):

scratch2.rb: --> scratch2.rb
expected a delimiter to close the parametersunexpected '.', ignoring it
> 1  def x.y.z
> 2  end

scratch2.rb:1: syntax errors found (SyntaxError)
> 1 | def x.y.z
    |        ^ unexpected '.', ignoring it
    |        ^ expected a delimiter to close the parameters
  2 | end
  3 |

This happens on Ruby master with the sentences reported above, but also on 3.3.5 with the sentences:
expected a delimiter to close the parameterscannot parse the expression.
In both cases, gem list returns syntax_suggest (default: 2.0.0).

Unfortunately I can't tell if the same glitch occurs with other error messages.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions