Skip to content

Commit a0581b9

Browse files
committed
Fix test for Ruby 4.1
1 parent f535ed9 commit a0581b9

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

test/rbs/annotate/rdoc_source_test.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,9 @@ class Hello3
7272
refute_predicate klass, :documented?
7373

7474
assert_nil RBS::Annotate::Formatter.translate(klass.comment.parse)
75-
assert_equal "", RBS::Annotate::Formatter.translate(klass.comment.parse.parts[0])
75+
if part = klass.comment.parse.parts[0] # In ruby-4.1, parts is empty.
76+
assert_equal "", RBS::Annotate::Formatter.translate(part)
77+
end
7678
end
7779
end
7880

0 commit comments

Comments
 (0)