lib/reline/terminfo.rb in reline-0.3.4 vs lib/reline/terminfo.rb in reline-0.3.5
- old
+ new
@@ -29,24 +29,10 @@
end
@curses_dl = false
def self.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.
- fiddle_supports_variadic = true
- elsif Fiddle.const_defined?(:VERSION,false) and Gem::Version.create(Fiddle::VERSION) >= Gem::Version.create('1.0.1')
- # Fiddle::TYPE_VARIADIC is supported from Fiddle 1.0.1.
- fiddle_supports_variadic = true
- else
- fiddle_supports_variadic = false
- end
- if fiddle_supports_variadic and not Fiddle.const_defined?(:TYPE_VARIADIC)
- # If the libffi version is not 3.0.5 or higher, there isn't TYPE_VARIADIC.
- fiddle_supports_variadic = false
- end
- if fiddle_supports_variadic
+ if Fiddle.const_defined?(:TYPE_VARIADIC)
curses_dl_files.each do |curses_name|
result = Fiddle::Handle.new(curses_name)
rescue Fiddle::DLError
next
else