From bff6a1ed4040529b0b9ef576aa3dc7e7e3d68743 Mon Sep 17 00:00:00 2001 From: tompng Date: Sat, 2 Dec 2023 04:47:28 +0900 Subject: [PATCH] Hide operator methods --- lib/repl_type_completor/result.rb | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/repl_type_completor/result.rb b/lib/repl_type_completor/result.rb index 1de88e5..4d1c72b 100644 --- a/lib/repl_type_completor/result.rb +++ b/lib/repl_type_completor/result.rb @@ -4,7 +4,13 @@ module ReplTypeCompletor class Result - HIDDEN_METHODS = %w[Namespace TypeName] # defined by rbs, should be hidden + OPERATOR_METHODS = %w[! != !~ % & * ** + +@ - -@ / < << <= <=> == === =~ > >= >> [] []= ^ ` | ~] + HIDDEN_METHODS = [ + # defined by RBS, should be hidden + 'Namespace', 'TypeName', + # operator methods does not need to be completed + *OPERATOR_METHODS + ] RESERVED_WORDS = %w[ __ENCODING__ __LINE__ __FILE__ BEGIN END