mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Reline callbacks can take nil
This commit is contained in:
parent
ca1f6b3eae
commit
68a7c8ad57
1 changed files with 5 additions and 5 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue