Skip to content

Ruby scanner sees Symbol instead of Operator #89

Open
@nathany

Description

@nathany

In a shortened condition, it seems that the operator : is wrongly classified as a Symbol when it is followed by an identifier without a space. See: http://coderay.rubychan.de/rays/show/6917 - @bovi (Daniel Bovensiepen)


It's a known problem. It's hard to tell ?: and :sym apart without doing false positives. In this case, it really looks like a Symbol :) - @korny

But I can try. Thank you for the test code:

n=->k{k==0?'':n[k-1]+'{'+n[k-1]+'}'}

From Redmine: http://odd-eyed-code.org/issues/266

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions