Skip to content

Please add support for ruby 4.1 source_location #5

@NikolasPilavakis

Description

@NikolasPilavakis

We would like to use this gem to grab the source of a proc. However, in some cases, we have to work with multiple procs in a single line, for which proc_to_ast raises ProcToAst::MultiMatchError because source_location does not have enough information to uniquely identify the source of a proc.

This will be solved in ruby 4.1, see ruby/ruby#15580. There's also a PR to add that information to Prism.node_for: ruby/prism#3808

Could you please add this functionality to proc_to_ast? I'm happy to help in any way I can.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions