File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -50,6 +50,7 @@ def initialize
50
50
@irb = IRB ::Irb . new ( @workspace )
51
51
@eval_path = @irb . context . irb_path
52
52
IRB . conf [ :MAIN_CONTEXT ] = @irb . context
53
+ @completor = IRB ::RegexpCompletor . new if defined? IRB ::RegexpCompletor # IRB::VERSION >= 1.8.2
53
54
end
54
55
55
56
def eval_binding
@@ -66,10 +67,9 @@ def eval(code, store_history)
66
67
end
67
68
68
69
def complete ( code )
69
- if defined? IRB ::RegexpCompletor # IRB::VERSION >= 1.8.2
70
- completor = IRB ::RegexpCompletor . new
70
+ if @completor
71
71
# preposing and postposing never used, so they are empty, pass only target as code
72
- completor . completion_candidates ( '' , code , '' , bind : @workspace . binding )
72
+ @ completor. completion_candidates ( '' , code , '' , bind : @workspace . binding )
73
73
else
74
74
IRB ::InputCompletor ::CompletionProc . call ( code )
75
75
end
You can’t perform that action at this time.
0 commit comments