diff --git a/lib/rbs/test/type_check.rb b/lib/rbs/test/type_check.rb index 3e8f9d3ba..243e5b4ba 100644 --- a/lib/rbs/test/type_check.rb +++ b/lib/rbs/test/type_check.rb @@ -364,6 +364,7 @@ def value(val, type) value(val, builder.expand_alias2(type.name.absolute!, type.args)) when Types::Tuple Test.call(val, IS_AP, ::Array) && + type.types.length == val.length && type.types.map.with_index {|ty, index| value(val[index], ty) }.all? when Types::Record Test::call(val, IS_AP, ::Hash) && diff --git a/stdlib/objspace/0/objspace.rbs b/stdlib/objspace/0/objspace.rbs index e51d42fd4..cdd89a3cb 100644 --- a/stdlib/objspace/0/objspace.rbs +++ b/stdlib/objspace/0/objspace.rbs @@ -411,7 +411,7 @@ module ObjectSpace # ObjectSpace.reachable_objects_from(1) # #=> nil # 1 is not markable (heap managed) object # - def self?.reachable_objects_from: (untyped) -> ([ untyped ] | nil) + def self?.reachable_objects_from: (untyped) -> (Array[untyped] | nil) #