Skip to content

Ruby scanner sees Symbol instead of Operator #89

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions