lib/rbs/constant_table.rb in rbs-2.6.0 vs lib/rbs/constant_table.rb in rbs-2.7.0.pre.1

- old
+ new

@@ -1,5 +1,7 @@ +# frozen_string_literal: true + module RBS class ConstantTable attr_reader :definition_builder attr_reader :constant_scopes_cache @@ -54,12 +56,12 @@ name_to_constant(TypeName.new(name: head, namespace: Namespace.root)) when context == [Namespace.root] name_to_constant(TypeName.new(name: head, namespace: Namespace.root)) else resolve_constant_reference_context(head, context: context) || - context.first.yield_self do |first_contet| - raise unless first_contet - resolve_constant_reference_inherit(head, scopes: constant_scopes(first_contet.to_type_name)) + context.first.yield_self do |first_context| + raise unless first_context + resolve_constant_reference_inherit(head, scopes: constant_scopes(first_context.to_type_name)) end end tail.inject(head_constant) do |constant, name| if constant