Skip to content

Commit

Permalink
Use current binding for completion if IRB main context is not available
Browse files Browse the repository at this point in the history
  • Loading branch information
Tom ten Thij committed Aug 18, 2010
1 parent 76abedd commit 03a0a6d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/irb/completion.rb
Expand Up @@ -34,7 +34,8 @@ module InputCompletor
]

CompletionProc = proc { |input|
bind = IRB.conf[:MAIN_CONTEXT].workspace.binding
context = IRB.conf[:MAIN_CONTEXT]
bind = context ? context.workspace.binding : binding

# puts "input: #{input}"

Expand Down

0 comments on commit 03a0a6d

Please sign in to comment.