Skip to content

repl: no RegExp side effects #18931

Description

@bnoordhuis
$ ./out/Release/node 
> RegExp.$_
'\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000'

Caused by the repl trying to fix up the side effects to RegExp.$1 toRegExp.$9. :-)

Activity

  1. added
    replIssues and PRs related to the REPL subsystem.
    on Feb 22, 2018
  2. princejwesley commented on Feb 22, 2018

    @princejwesley
    Contributor

    @bnoordhuis When we run from the file, the output should be empty, right?

    Source: /Users/princejohnwesley/Desktop/RegExpInput.js

    console.log(RegExp.$_)
    output (< v8.0.0)
    /Users/princejohnwesley/Desktop/RegExpInput.js
    
    output (>= v8.0.0)
    { 'target_defaults': { 'cflags': [],
                           'default_configuration': 'Release',
                           'defines': [],
                           'include_dirs': [],
                           'libraries': []},
      'variables': { 'asan': 0,
                     'coverage': 'false',
                     'debug_devtools': 'node',
                     'force_dynamic_crt': 0,
                     'host_arch': 'x64',
                     'icu_data_file': 'icudt59l.dat',
                     'icu_data_in': '../../deps/icu-small/source/data/in/icudt59l.dat',
                     'icu_endianness': 'l',
                     'icu_gyp_path': 'tools/icu/icu-generic.gyp',
                     'icu_locales': 'en,root',
                     'icu_path': 'deps/icu-small',
                     'icu_small': 'true',
                     'icu_ver_major': '59',
                     'llvm_version': 0,
                     'node_byteorder': 'little',
                     'node_enable_d8': 'false',
                     'node_enable_v8_vtunejit': 'false',
                     'node_install_npm': 'true',
                     'node_module_version': 57,
                     'node_no_browser_globals': 'false',
                     'node_prefix': '/',
                     'node_release_urlbase': 'https://nodejs.org/download/release/',
                     'node_shared': 'false',
                     'node_shared_cares': 'false',
                     'node_shared_http_parser': 'false',
                     'node_shared_libuv': 'false',
                     'node_shared_openssl': 'false',
                     'node_shared_zlib': 'false',
                     'node_tag': '',
                     'node_use_bundled_v8': 'true',
                     'node_use_dtrace': 'true',
                     'node_use_etw': 'false',
                     'node_use_lttng': 'false',
                     'node_use_openssl': 'true',
                     'node_use_perfctr': 'false',
                     'node_use_v8_platform': 'true',
                     'node_without_node_options': 'false',
                     'openssl_fips': '',
                     'openssl_no_asm': 0,
                     'shlib_suffix': '57.dylib',
                     'target_arch': 'x64',
                     'uv_parent_path': '/deps/uv/',
                     'uv_use_dtrace': 'true',
                     'v8_enable_gdbjit': 0,
                     'v8_enable_i18n_support': 1,
                     'v8_enable_inspector': 1,
                     'v8_no_strict_aliasing': 1,
                     'v8_optimized_debug': 0,
                     'v8_promise_internal_field_count': 1,
                     'v8_random_seed': 0,
                     'v8_use_snapshot': 'true',
                     'want_separate_host_toolset': 0,
                     'want_separate_host_toolset_mkpeephole': 0,
                     'xcode_version': '7.0'}}
  3. bnoordhuis commented on Feb 22, 2018

    @bnoordhuis
    MemberAuthor

    @princejwesley That's right,

  4. BridgeAR commented on Apr 4, 2019

    @BridgeAR
    Member

    I had a look at this and it seems the only way to really solve this is the solution suggested by @princejwesley in #20549.

    We should either accept this as a side effect that we do not want to fix or we should revive that PR. I personally suggest we go for the latter.

  5. added
    help wantedIssues that need assistance from volunteers or PRs that need help to proceed.
    on Jun 26, 2020
  6. BridgeAR commented on Sep 11, 2025

    @BridgeAR
    Member

    @aduh95 @ljharb I think this might be something either of you might be interested in looking at / fixing?

  7. github-actions commented on Jun 27, 2026

    @github-actions
    Contributor

    This issue has been marked as stale due to 210 days of inactivity.
    It will be automatically closed in 30 days if no further activity occurs. If this is still relevant, please leave a comment or update it to keep it open.

  8. added
    staleIssues and PRs marked stale due to inactivity and scheduled for automatic closure.
    on Jun 27, 2026
  9. added
    never-staleIssues and PRs exempt from automated stale handling.
    and removed
    staleIssues and PRs marked stale due to inactivity and scheduled for automatic closure.
    on Jun 27, 2026
  10. added a commit that references this issue on Jul 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

help wantedIssues that need assistance from volunteers or PRs that need help to proceed.never-staleIssues and PRs exempt from automated stale handling.replIssues and PRs related to the REPL subsystem.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions