Skip to content

Commit 10a2e5b

Browse files
committed
ruby_parser.rb - add void_stmt to insert_comments loop
1 parent 4b5c875 commit 10a2e5b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/yard/parser/ruby/ruby_parser.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -612,7 +612,7 @@ def comment_starts_line?(charno)
612612

613613
def insert_comments
614614
root.traverse do |node|
615-
next if node.type == :comment || node.type == :list || node.parent.type != :list
615+
next if %i{comment void_stmt list}.include?(node.type) || node.parent.type != :list
616616

617617
# never attach comments to if/unless mod nodes
618618
if node.type == :if_mod || node.type == :unless_mod

0 commit comments

Comments
 (0)