ruby-changes:66524
From: aycabta <ko1@a...>
Date: Mon, 21 Jun 2021 18:44:35 +0900 (JST)
Subject: [ruby-changes:66524] 582b5705ab (master): [ruby/reline] Check existance of a constant, Fiddle::VERSION
https://git.ruby-lang.org/ruby.git/commit/?id=582b5705ab From 582b5705abf70318b00be7c3cb9a41bbe4897a20 Mon Sep 17 00:00:00 2001 From: aycabta <aycabta@g...> Date: Thu, 20 May 2021 19:40:09 +0900 Subject: [ruby/reline] Check existance of a constant, Fiddle::VERSION https://github.com/ruby/reline/commit/4b74c3d83a --- lib/reline/terminfo.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/reline/terminfo.rb b/lib/reline/terminfo.rb index 1029d79..cfc8280 100644 --- a/lib/reline/terminfo.rb +++ b/lib/reline/terminfo.rb @@ -9,7 +9,7 @@ module Reline::Terminfo https://github.com/ruby/ruby/blob/trunk/lib/reline/terminfo.rb#L9 @curses_dl = nil def self.curses_dl return @curses_dl if @curses_dl - if Gem::Version.create(Fiddle::VERSION) >= Gem::Version.create('1.0.1') + if Fiddle.const_defined?(:VERSION) and Gem::Version.create(Fiddle::VERSION) >= Gem::Version.create('1.0.1') # Fiddle::TYPE_VARIADIC is supported from Fiddle 1.0.1. %w[libncursesw.so libcursesw.so libncurses.so libcurses.so].each do |curses_name| result = Fiddle::Handle.new(curses_name) -- cgit v1.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/