Skip to content

Commit

Permalink
Update comments
Browse files Browse the repository at this point in the history
  • Loading branch information
andyw8 committed Jul 25, 2024
1 parent f965b8c commit c25bd71
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion lib/ruby_indexer/lib/ruby_indexer/rbs_indexer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,9 @@ def handle_class_or_module_declaration(declaration, pathname)
handle_method(member, entry)
when RBS::AST::Declarations::Constant
handle_constant(member, nesting, file_path)
when RBS::AST::Members::Alias # NOTE: This is a signature alias, not a Ruby method alias
when RBS::AST::Members::Alias
# In RBS, an alias means that two methods have the same signature.
# It does not mean the same thing as a Ruby alias.
handle_signature_alias(member, entry)
end
end
Expand Down
4 changes: 2 additions & 2 deletions lib/ruby_indexer/test/rbs_indexer_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -332,8 +332,8 @@ def self?.open: (String name, ?String mode, ?Integer perm) -> IO?
end

def test_signature_alias
# In RBS, an alias means that two methods have the same signature. It does not mean the same thing as a Ruby
# alias.
# In RBS, an alias means that two methods have the same signature.
# It does not mean the same thing as a Ruby alias.
any_entries = @index["any?"]

assert_equal(["Array", "Enumerable", "Hash"], any_entries.map { _1.owner.name })
Expand Down

0 comments on commit c25bd71

Please sign in to comment.