mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Fix caching of curses_dl
This commit is contained in:
parent
7af21a78fa
commit
9bfb8ea671
1 changed files with 3 additions and 2 deletions
|
@ -20,9 +20,9 @@ module Reline::Terminfo
|
|||
end
|
||||
end
|
||||
|
||||
@curses_dl = nil
|
||||
@curses_dl = false
|
||||
def self.curses_dl
|
||||
return @curses_dl if @curses_dl
|
||||
return @curses_dl unless @curses_dl == false
|
||||
if RUBY_VERSION >= '3.0.0'
|
||||
# Gem module isn't defined in test-all of the Ruby repository, and
|
||||
# Fiddle in Ruby 3.0.0 or later supports Fiddle::TYPE_VARIADIC.
|
||||
|
@ -47,6 +47,7 @@ module Reline::Terminfo
|
|||
break
|
||||
end
|
||||
end
|
||||
@curses_dl = nil if @curses_dl == false
|
||||
@curses_dl
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue