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

Keyword argument(s) in parenthesis-less method definition result in invalid code #331

Open
pjg opened this issue Sep 7, 2024 · 0 comments

Comments

@pjg
Copy link

pjg commented Sep 7, 2024

Ruby 3.2.5
rufo 0.18.0

parens_in_def :dynamic
quote_style :single
class User
  def self.by_uid uid:
    joins(:authentications).where(authentications: { uid: }).first
  end
end
rufo app/models/user.rb

results in broken ruby code (all squashed into a single line):

class X
  def self.by_uid uid: joins(:authentications).where(authentications: { uid: }).first end
end
circular argument reference - uid
.../app/models/user.rb:2: syntax error, unexpected `end', expecting ';' or '\n'
...ntications: { uid: }).first end
kzkn added a commit that referenced this issue Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant