Skip to content

Commit 35322e4

Browse files
committed
Expand [something, nil] types
1 parent b878786 commit 35322e4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

support/yard_full_types.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ def signature_types(meth, link = true)
1616
if meth.tag(:return) && meth.tag(:return).types
1717
types = meth.tags(:return).map {|t| t.types ? t.types : [] }.flatten.uniq
1818
first = link ? h(types.first) : format_types([types.first], false)
19-
if types.size == 2 && types.last == 'nil'
20-
type = first + '<sup>?</sup>'
21-
elsif types.size == 2 && types.last =~ /^(Array)?<#{Regexp.quote types.first}>$/
19+
# if types.size == 2 && types.last == 'nil'
20+
# type = first + '<sup>?</sup>'
21+
if types.size == 2 && types.last =~ /^(Array)?<#{Regexp.quote types.first}>$/
2222
type = first + '<sup>+</sup>'
2323
# elsif types.size > 2
2424
# type = [first, '...'].join(', ')

0 commit comments

Comments
 (0)