From 16cf2ef6f2ad61fbbf613f87c9038f3a6af4fc15 Mon Sep 17 00:00:00 2001 From: aycabta Date: Tue, 31 Aug 2021 04:26:41 +0900 Subject: [PATCH] [ruby/irb] Don't show doc when pointer is negative https://github.com/ruby/irb/commit/48af34bfc2 --- lib/irb/input-method.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/irb/input-method.rb b/lib/irb/input-method.rb index 725d142919..5fe248dfc1 100644 --- a/lib/irb/input-method.rb +++ b/lib/irb/input-method.rb @@ -323,7 +323,7 @@ module IRB return nil end cursor_pos_to_render, result, pointer = context.pop(3) - return nil if result.nil? or pointer.nil? + return nil if result.nil? or pointer.nil? or pointer < 0 name = result[pointer] name = IRB::InputCompletor.retrieve_completion_data(name, doc_namespace: true)