mirror of https://github.com/rkd77/elinks.git synced 2024-07-16 15:04:37 -04:00

Revisit Ruby version checking fix

The version checking was recently reworked in commit
14d5ff3b17, however use of 'puts' is wrong
because it returns nil and thus always causes the check to exit with code

The issue was brought up by dalias. Acked on IRC by Thomas Adam.
This commit is contained in:
Jonas Fonseca 2006-11-18 11:21:17 +01:00
parent 44537de0c4
commit ca7a70b243

View File

@ -32,7 +32,7 @@ if test "$CONFIG_SCRIPTING_RUBY" = "yes"; then
if test "$CONFIG_SCRIPTING_RUBY" != "no"; then
AC_MSG_CHECKING(Ruby version)
if $CONFIG_SCRIPTING_RUBY -e 'puts "#{VERSION rescue RUBY_VERSION}" >= "1.6.0" or exit 1' >/dev/null 2>/dev/null; then
if $CONFIG_SCRIPTING_RUBY -e 'exit((VERSION or RUBY_VERSION) >= "1.6.0")' >/dev/null 2>/dev/null; then
ruby_version=`$CONFIG_SCRIPTING_RUBY -e 'puts "#{VERSION rescue RUBY_VERSION}"'`