diff --git a/lib/rbs/locator.rb b/lib/rbs/locator.rb index d3a4ce6985..88363e4709 100644 --- a/lib/rbs/locator.rb +++ b/lib/rbs/locator.rb @@ -238,7 +238,7 @@ def find_in_loc(pos, location:, array:) def test_loc(pos, location:) if location - location.range === pos + location.start_pos <= pos && pos <= location.end_pos else false end diff --git a/sig/locator.rbs b/sig/locator.rbs index f81df9d34b..a16543bc05 100644 --- a/sig/locator.rbs +++ b/sig/locator.rbs @@ -37,8 +37,6 @@ module RBS # def find2: (line: Integer, column: Integer) -> [Symbol?, Array[component]]? - private - def find_in_directive: (Integer pos, AST::Directives::t, Array[component]) -> bool def find_in_decl: (Integer pos, decl: AST::Declarations::t, array: Array[component]) -> bool