1
0
Fork 0
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:
aycabta 2020-05-03 14:36:33 +09:00
parent dc0cdf4322
commit fc2a121c7c

View file

@ -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