aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/irb/input-method.rb2
1 files changed, 1 insertions, 1 deletions
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)