summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authormanga_osyo <manga.osyo@gmail.com>2019-11-20 09:13:42 +0900
committeraycabta <aycabta@gmail.com>2019-11-21 00:47:37 +0900
commit6723aa07e591a13996b5af205c589200d44c5249 (patch)
tree081ff2a73fe80c982df3e7435571aceb560002fc /lib
parent81586a4d9fd6afe1c39f737a704c5010faf22192 (diff)
Change argument `Proc` to `#call` defined object.
This is the same as the behavior of Readline.
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