From fd43c2b98774eff6b49bbfcc1d182bdd349da746 Mon Sep 17 00:00:00 2001 From: Soutaro Matsumoto Date: Fri, 4 Jul 2025 17:25:23 +0900 Subject: [PATCH 1/2] Fix locator position comparison --- lib/rbs/locator.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 From cfc783adaf736e06c4c640448027cb0f382b41a1 Mon Sep 17 00:00:00 2001 From: Soutaro Matsumoto Date: Fri, 4 Jul 2025 17:25:36 +0900 Subject: [PATCH 2/2] Expose `find_*` utility methods --- sig/locator.rbs | 2 -- 1 file changed, 2 deletions(-) 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