@@ -1403,23 +1403,23 @@ def foo: (String) -> String | ...
14031403 foo . defs [ 0 ] . tap do |defn |
14041404 assert_equal parse_method_type ( "(::String) -> ::String" ) , defn . type
14051405 assert_equal "doc2\n " , defn . comment . string
1406- assert_equal [ "world" ] , defn . annotations . map ( &:string )
1406+ assert_equal [ "hello" , " world"] , defn . each_annotation . map ( &:string )
14071407 assert_equal type_name ( "::Hello" ) , defn . defined_in
14081408 assert_equal type_name ( "::Hello" ) , defn . implemented_in
14091409 end
14101410
14111411 foo . defs [ 1 ] . tap do |defn |
14121412 assert_equal parse_method_type ( "() -> ::String" ) , defn . type
14131413 assert_equal "doc1\n " , defn . comment . string
1414- assert_equal [ "hello" ] , defn . annotations . map ( &:string )
1414+ assert_equal [ "hello" , "world" ] , defn . each_annotation . map ( &:string )
14151415 assert_equal type_name ( "::Hello" ) , defn . defined_in
14161416 assert_equal type_name ( "::Hello" ) , defn . implemented_in
14171417 end
14181418
14191419 foo . defs [ 2 ] . tap do |defn |
14201420 assert_equal parse_method_type ( "(::Integer) -> ::String" ) , defn . type
14211421 assert_equal "doc1\n " , defn . comment . string
1422- assert_equal [ "hello" ] , defn . annotations . map ( &:string )
1422+ assert_equal [ "hello" , "world" ] , defn . each_annotation . map ( &:string )
14231423 assert_equal type_name ( "::Hello" ) , defn . defined_in
14241424 assert_equal type_name ( "::Hello" ) , defn . implemented_in
14251425 end
@@ -1460,15 +1460,15 @@ def foo: (Integer) -> String | ...
14601460 foo . defs [ 0 ] . tap do |defn |
14611461 assert_equal parse_method_type ( "(::Integer) -> ::String" ) , defn . type
14621462 assert_equal "Hello#foo\n " , defn . comment . string
1463- assert_equal [ "Hello#foo" ] , defn . annotations . map ( &:string )
1463+ assert_equal [ "_Hello#foo" , " Hello#foo"] , defn . each_annotation . map ( &:string )
14641464 assert_equal type_name ( "::Hello" ) , defn . defined_in
14651465 assert_equal type_name ( "::Hello" ) , defn . implemented_in
14661466 end
14671467
14681468 foo . defs [ 1 ] . tap do |defn |
14691469 assert_equal parse_method_type ( "() -> ::String" ) , defn . type
14701470 assert_equal "_Hello#foo\n " , defn . comment . string
1471- assert_equal [ "_Hello#foo" ] , defn . annotations . map ( &:string )
1471+ assert_equal [ "_Hello#foo" , "Hello#foo" ] , defn . each_annotation . map ( &:string )
14721472 assert_equal type_name ( "::_Hello" ) , defn . defined_in
14731473 assert_equal type_name ( "::Hello" ) , defn . implemented_in
14741474 end
0 commit comments