Skip to content

Error on emitting reference for capture groups #181

@varungandhi-src

Description

@varungandhi-src

Input

[scip-ruby] couldn't find field 1 in class <redacted>;
    18 |      string =~ /(.+);\s*$/ ? $1 : string
                                      ^^

Undesirable behavior

The error seems incorrect, we shouldn't be checking for $1 as being a field, it's special syntax for the captured value in the capture group in the preceding regex. (https://stackoverflow.com/questions/6673847/what-are-rubys-numbered-global-variables)

Expected behavior

No error.

scip-ruby-debug indexing output

n/a

Configuration

scip-ruby v0.3.3

Additional info

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions