ruby-changes:67061
From: Nobuyoshi <ko1@a...>
Date: Fri, 6 Aug 2021 14:18:53 +0900 (JST)
Subject: [ruby-changes:67061] 9bfb8ea671 (master): Fix caching of curses_dl
https://git.ruby-lang.org/ruby.git/commit/?id=9bfb8ea671 From 9bfb8ea6715571b4318b018b703d40750acf2ccb Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Fri, 6 Aug 2021 13:33:47 +0900 Subject: Fix caching of curses_dl --- lib/reline/terminfo.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/reline/terminfo.rb b/lib/reline/terminfo.rb index 79f3f1d..a2dae44 100644 --- a/lib/reline/terminfo.rb +++ b/lib/reline/terminfo.rb @@ -20,9 +20,9 @@ module Reline::Terminfo https://github.com/ruby/ruby/blob/trunk/lib/reline/terminfo.rb#L20 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 https://github.com/ruby/ruby/blob/trunk/lib/reline/terminfo.rb#L47 break end end + @curses_dl = nil if @curses_dl == false @curses_dl end end -- cgit v1.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/