Skip to content

MutationVisitor doesn't follow assignment value #373

Open
@ryanb

Description

@ryanb

Looks like the MutationVisitor#visit_assign doesn't follow the node's value.

def visit_assign(node)
  node.copy(target: visit(node.target))
end

Is this intentional? Here's a fix.

def visit_assign(node)
  node.copy(target: visit(node.target), value: visit(node.value))
end

I can make a PR if you need.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions