1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Remove half-defined Reline on LoadError

When fiddle is not avaiable, reline/terminfo depending on it also
fails.
This commit is contained in:
Nobuyoshi Nakada 2021-07-10 21:02:26 +09:00
parent d172f8ac09
commit 491ab2820a
No known key found for this signature in database
GPG key ID: 7CD2805BFA3770C6

View file

@ -12,6 +12,7 @@ end
begin
require "reline"
rescue LoadError
Object.class_eval {remove_const :Reline} if defined?(Reline)
else
def use_lib_reline # Use lib/reline as Readline
Reline.send(:remove_const, 'IOGate') if Reline.const_defined?('IOGate')