Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SyntaxError when parsing anonymous block forwarding #533

Closed
clinejj opened this issue Apr 10, 2022 · 0 comments · Fixed by #577
Closed

SyntaxError when parsing anonymous block forwarding #533

clinejj opened this issue Apr 10, 2022 · 0 comments · Fixed by #577
Labels
Milestone

Comments

@clinejj
Copy link

clinejj commented Apr 10, 2022

Using Steep 0.52, I run into a syntax error when using anonymous block forwarding:

Example code:

  def nav_orders_link(organization, options = {}, &)
    path = orders_path(organization)
    options[:rel] = 'noopener'

    link_to(t('navigation.orders'), path, options, &)
  end

Steep output:

app/helpers/navigation_helper.rb:50:51: [error] SyntaxError: unexpected token tRPAREN
│ Diagnostic ID: Ruby::SyntaxError
│
└   def nav_orders_link(organization, options = {}, &)
                                                     ~

Changing the & to &block fixes the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants