Skip to content

Commit

Permalink
Stop node retrieval iteration in "definition" when matched
Browse files Browse the repository at this point in the history
  • Loading branch information
mame committed Jul 22, 2024
1 parent c51e74f commit 4b675a7
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 2 deletions.
1 change: 1 addition & 0 deletions lib/typeprof/core/service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ def definitions(path, pos)
end
end
end
return defs unless defs.empty?
end
return defs
end
Expand Down
1 change: 0 additions & 1 deletion scenario/difinitions/definition.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ def call

## definition: test.rb:9:1
test.rb:(1,7)-(1,13)
test.rb:(2,8)-(2,11)

## definition: test.rb:9:9
test.rb:(2,8)-(2,11)
Expand Down
1 change: 0 additions & 1 deletion scenario/difinitions/definition_multibyte_characters.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ def 🐱🐱🐱

## definition: test.rb:9:1
test.rb:(1,7)-(1,10)
test.rb:(2,8)-(2,10)

## definition: test.rb:9:6
test.rb:(2,8)-(2,10)
Expand Down

0 comments on commit 4b675a7

Please sign in to comment.