Skip to content

Commit 9e81252

Browse files
authored
Merge pull request #2899 from ruby/fix-ruby-head-test
Fix test for Ruby 4.1
2 parents f535ed9 + a0581b9 commit 9e81252

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)