Skip to content

repl: no RegExp side effects for static properties

Preserve all RegExp static properties

  • RegExp.$1 to RegExp.9
  • input, lastMatch, lastParen
  • leftContext and rightContext

Fixes: https://github.com/nodejs/node/issues/18931

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines
Affected core subsystem(s)

repl

cc: @bnoordhuis

Merge request reports

Loading