summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/reline.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/reline.rb b/lib/reline.rb
index feee94e994..7352d1a625 100644
--- a/lib/reline.rb
+++ b/lib/reline.rb
@@ -84,22 +84,22 @@ module Reline
end
def completion_proc=(p)
- raise ArgumentError unless p.is_a?(Proc)
+ raise ArgumentError unless p.respond_to?(:call)
@completion_proc = p
end
def output_modifier_proc=(p)
- raise ArgumentError unless p.is_a?(Proc)
+ raise ArgumentError unless p.respond_to?(:call)
@output_modifier_proc = p
end
def prompt_proc=(p)
- raise ArgumentError unless p.is_a?(Proc)
+ raise ArgumentError unless p.respond_to?(:call)
@prompt_proc = p
end
def auto_indent_proc=(p)
- raise ArgumentError unless p.is_a?(Proc)
+ raise ArgumentError unless p.respond_to?(:call)
@auto_indent_proc = p
end
@@ -108,7 +108,7 @@ module Reline
end
def dig_perfect_match_proc=(p)
- raise ArgumentError unless p.is_a?(Proc)
+ raise ArgumentError unless p.respond_to?(:call)
@dig_perfect_match_proc = p
end