Skip to content

Commit 43b38a5

Browse files
authored
Merge pull request #393 from viralpraxis/fix-extra-begin-within-dsym
Fix extra `begin` within `dsym` edge case
2 parents b92be07 + 72c5a6d commit 43b38a5

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

lib/unparser/emitter/dsym.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def emit_str_child(value)
3333

3434
def emit_begin_child(component)
3535
write('#{')
36-
visit(unwrap_single_begin(component))
36+
visit(unwrap_single_begin(component)) if component.children.any?
3737
write('}')
3838
end
3939
end # DSym

test/corpus/semantic/literal.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,4 @@
1212
10.2e10000000000
1313
-10.2e10000000000
1414
w(foo bar)
15+
{ "#{}": {} }

0 commit comments

Comments
 (0)