Skip to content

Commit

Permalink
Fix splat cases
Browse files Browse the repository at this point in the history
Closes #65
  • Loading branch information
Sam Phippen committed Mar 24, 2019
1 parent 42e3871 commit d7ab677
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
6 changes: 6 additions & 0 deletions fixtures/splat_case_actual.rb
@@ -0,0 +1,6 @@
case
when *a
when c
when d,e,f
end

5 changes: 5 additions & 0 deletions fixtures/splat_case_expected.rb
@@ -0,0 +1,5 @@
case
when *a
when c
when d, e, f
end
2 changes: 1 addition & 1 deletion src/rubyfmt.rb
Expand Up @@ -1945,7 +1945,7 @@ def format_case_parts(ps, case_parts)
ps.emit_indent
ps.emit_ident("when ")
ps.with_start_of_line(false) do
format_list_like_thing_items(ps, [conditional], true)
format_list_like_thing(ps, [conditional], true)
end

ps.emit_newline
Expand Down

0 comments on commit d7ab677

Please sign in to comment.