Skip to content

Change RegexpError exception message to match CRuby #3398

@postmodern

Description

@postmodern

I noticed that Regexp.new(...) raises a slightly different RegexpError exception message when it cannot parse the regular expression. This causes certain tests that check the exception message to fail when ran under TruffleRuby.

Steps To Reproduce

Regexp.new('[abc')

CRuby

premature end of char-class: /[abc/ (RegexpError)

TruffleRuby

premature end of char-class (org.joni.exception.SyntaxException): /[abc/ (RegexpError)

Version Information

  • ruby 3.2.2 (2023-03-30 revision e51014f9c0) [x86_64-linux]
  • truffleruby 23.1.2, like ruby 3.2.2, Oracle GraalVM Native [x86_64-linux]

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions