Skip to content
Snippets Groups Projects
Commit d62ab889 authored by yui-knk's avatar yui-knk
Browse files

Fix bug when used with pry-remote(drb environment).

See https://github.com/Mon-Ouie/pry-remote/issues/49 .
When we translate Proc object with drb, proc is wrapped with DRbObject.
In this case defined? proc.call is not delegated to proc self.
But proc.respond_to? :call is delegated to proc self.
So here it is better to check `proc.respond_to? :call`.
parent dc35d12d
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -89,7 +89,7 @@ module Readline
# Readline.completion_proc = proc{ |s| list.grep( /^#{Regexp.escape(s)}/) }
#
def self.completion_proc=(proc)
unless defined? proc.call
unless proc.respond_to? :call
raise ArgumentError,"argument must respond to `call'"
end
@completion_proc = proc
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment