Skip to content

util.inspect not checking for loops in {,Weak}Map data #14758

Closed
@rdeforest

Description

@rdeforest
  • Version: v8.2.1
  • Platform: Darwin a0999b0cf96f.ant.amazon.com 16.6.0 Darwin Kernel Version 16.6.0: Fri Apr 14 16:21:16 PDT 2017; root:xnu-3789.60.24~6/RELEASE_X86_64 x86_64
  • Subsystem: util

Expected behavior:

coffee> m = new Map
Map {}
coffee> m.set m, m
ref1 = Map {
  ref1 => ref1
}
coffee>

Actual behavior:

coffee> m = new Map
Map {}
coffee> m.set m, m
Map {
  Map {
  Map { [Object] => [Object] } => Map { [Object] => [Object] } } => Map {
  Map { [Object] => [Object] } => Map { [Object] => [Object] } } }
coffee>

I know this is a non-trivial problem to solve but it seems worth at least documenting if not solving.

Metadata

Metadata

Assignees

No one assigned

    Labels

    confirmed-bugIssues with confirmed bugs.utilIssues and PRs related to the built-in util module.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions