Skip to content

Ruby: &[SPACE][identifier] syntax breaks Ruby parsing #21801

@JLLeitschuh

Description

@JLLeitschuh

CodeQL's Ruby breaks parsing breaks for the following code:

sorted_array = array.sort(& custom_sorts[params[:sortby]])

I understand that the following should be how this is written, but sometimes people put weird syntax in and it shouldn't break a whole file being parsed:

sorted_array = array.sort(&custom_sorts[params[:sortby]])

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions