Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions spec/lib/rufo/formatter_source_specs/method_definition.rb.spec
Original file line number Diff line number Diff line change
Expand Up @@ -371,3 +371,13 @@ end
def foo(a, ...)
p(...)
end

#~# ORIGINAL issue_331
def foo a:
a
end

#~# EXPECTED
def foo(a:)
a
end
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,18 @@ def a x;x end;def b y;y end;def c z;z end # comment
def a(x); x end
def b(y); y end
def c(z); z end # comment

#~# ORIGINAL issue_331
#~# parens_in_def: :dynamic
class User
def self.by_uid uid:
joins(:authentications).where(authentications: { uid: }).first
end
end

#~# EXPECTED
class User
def self.by_uid uid:
joins(:authentications).where(authentications: { uid: }).first
end
end
Loading