aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authoraycabta <aycabta@gmail.com>2020-05-13 07:21:44 +0900
committeraycabta <aycabta@gmail.com>2020-05-14 12:27:33 +0900
commit68a7c8ad5781ecfa12cf7b512b5745ba1a78bdcd (patch)
tree742569de493316a5f1e0fbac115887297a5e550a /lib
parentca1f6b3eae076fefe1b1c042a9191894c6773669 (diff)
downloadruby-68a7c8ad5781ecfa12cf7b512b5745ba1a78bdcd.tar.gz
Reline callbacks can take nil
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 1537ee7e69..91863ebfea 100644
--- a/lib/reline.rb
+++ b/lib/reline.rb
@@ -98,22 +98,22 @@ module Reline
end
def completion_proc=(p)
- raise ArgumentError unless p.respond_to?(:call)
+ raise ArgumentError unless p.respond_to?(:call) or p.nil?
@completion_proc = p
end
def output_modifier_proc=(p)
- raise ArgumentError unless p.respond_to?(:call)
+ raise ArgumentError unless p.respond_to?(:call) or p.nil?
@output_modifier_proc = p
end
def prompt_proc=(p)
- raise ArgumentError unless p.respond_to?(:call)
+ raise ArgumentError unless p.respond_to?(:call) or p.nil?
@prompt_proc = p
end
def auto_indent_proc=(p)
- raise ArgumentError unless p.respond_to?(:call)
+ raise ArgumentError unless p.respond_to?(:call) or p.nil?
@auto_indent_proc = p
end
@@ -122,7 +122,7 @@ module Reline
end
def dig_perfect_match_proc=(p)
- raise ArgumentError unless p.respond_to?(:call)
+ raise ArgumentError unless p.respond_to?(:call) or p.nil?
@dig_perfect_match_proc = p
end