ruby / prism

Prism Ruby parser
https://ruby.github.io/prism/
MIT License
825 stars 139 forks source link

Invalid Control Escape Sequence #883

Closed jemmaissroff closed 1 year ago

jemmaissroff commented 1 year ago

The following files all have the same lex error, Invalid Control Escape Sequence

facter-2.5.7-universal-darwin/spec/unit/core/execution/posix_spec.rb
facter-2.5.7-universal-darwin/spec/unit/core/execution/windows_spec.rb
facter-2.5.7-x64-mingw32/spec/unit/core/execution/posix_spec.rb
facter-2.5.7-x64-mingw32/spec/unit/core/execution/windows_spec.rb
facter-2.5.7-x86-mingw32/spec/unit/core/execution/posix_spec.rb
facter-2.5.7-x86-mingw32/spec/unit/core/execution/windows_spec.rb
git_dump-0.1.1/spec/git_dump_spec.rb
macinbox-4.1.1/lib/macinbox/actions/create_vdi_from_image.rb
math_ml-0.14/spec/math_ml/latex/parser_spec.rb
mathemagical-0.0.1/spec/math_ml/latex/parser_spec.rb
mathml-0.10.1/spec/math_ml/latex/parser_spec.rb
puppet-7.24.0/spec/unit/util_spec.rb
puppet-7.24.0-universal-darwin/spec/unit/util_spec.rb
puppet-7.24.0-x64-mingw32/spec/unit/util_spec.rb
puppet-7.24.0-x86-mingw32/spec/unit/util_spec.rb
haldun commented 1 year ago

A minimal example

%w[\\?\C:\foo\bar]

Here we try to find a - after C but \C in this case is not a control escape sequence but instead a Windows path.