mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
[ruby/reline] If history-size isn't numeric, it should be 500
https://tiswww.case.edu/php/chet/readline/readline.html#IDX25 > If an attempt is made to set history-size to a non-numeric value, the maximum > number of history entries will be set to 500. https://github.com/ruby/reline/commit/acf0437280
This commit is contained in:
parent
dc0cdf4322
commit
fc2a121c7c
1 changed files with 5 additions and 1 deletions
|
@ -210,7 +210,11 @@ class Reline::Config
|
|||
def bind_variable(name, value)
|
||||
case name
|
||||
when 'history-size'
|
||||
@history_size = value.to_i
|
||||
begin
|
||||
@history_size = Integer(value)
|
||||
rescue ArgumentError
|
||||
@history_size = 500
|
||||
end
|
||||
when 'bell-style'
|
||||
@bell_style =
|
||||
case value
|
||||
|
|
Loading…
Reference in a new issue