Skip to content

Syntax Error: Inline Comments after rescue \ #911

@nicholasdower

Description

@nicholasdower

Commit: 95210d7

Input

→ View on rubyfmt.run

begin
rescue \
    Foo, # comment
    Bar => ex
  puts ex
end

Output

begin
rescue  # comment
 Foo,
  Bar => ex
  puts(ex)
end

Expected behavior

The comment should be moved above rescue and Foo should be moved to the rescue line.

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