diff src/configure.ac @ 30421:425b686c5244 v9.0.0546

patch 9.0.0546: supporting Ruby 1.8 makes code complicated Commit: https://github.com/vim/vim/commit/236ccbf6f8a671a45b773de4b34558ecfdf9ac02 Author: K.Takata <kentkt@csc.jp> Date: Thu Sep 22 16:12:06 2022 +0100 patch 9.0.0546: supporting Ruby 1.8 makes code complicated Problem: Supporting Ruby 1.8 makes code complicated. Solution: Drop Ruby 1.8 support, it is ancient. (Ken Takata, closes https://github.com/vim/vim/issues/11195)
author Bram Moolenaar <Bram@vim.org>
date Thu, 22 Sep 2022 17:15:03 +0200
parents 029c59bf78f1
children 101f08b49ed3
line wrap: on
line diff
--- a/src/configure.ac
+++ b/src/configure.ac
@@ -1990,7 +1990,7 @@ if test "$enable_rubyinterp" = "yes" -o 
   AC_PATH_PROG(vi_cv_path_ruby, $RUBY_CMD)
   if test "X$vi_cv_path_ruby" != "X"; then
     AC_MSG_CHECKING(Ruby version)
-    if $vi_cv_path_ruby -e '(VERSION rescue RUBY_VERSION) >= "1.6.0" or exit 1' >/dev/null 2>/dev/null; then
+    if $vi_cv_path_ruby -e 'RUBY_VERSION >= "1.9.1" or exit 1' >/dev/null 2>/dev/null; then
       AC_MSG_RESULT(OK)
       AC_MSG_CHECKING(Ruby rbconfig)
       ruby_rbconfig="RbConfig"
@@ -2009,7 +2009,7 @@ if test "$enable_rubyinterp" = "yes" -o 
         fi
         rubyversion=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig::CONFIG[['ruby_version']].gsub(/\./, '')[[0,2]]"`
 	if test "X$rubyversion" = "X"; then
-	  rubyversion=`$vi_cv_path_ruby -e "print ((VERSION rescue RUBY_VERSION)).gsub(/\./, '')[[0,2]]"`
+	  rubyversion=`$vi_cv_path_ruby -e "print RUBY_VERSION.gsub(/\./, '')[[0,2]]"`
 	fi
         RUBY_CFLAGS="$RUBY_CFLAGS -DRUBY_VERSION=$rubyversion"
 	rubylibs=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig::CONFIG[['LIBS']]"`
@@ -2062,7 +2062,7 @@ if test "$enable_rubyinterp" = "yes" -o 
 	AC_MSG_RESULT(not found; disabling Ruby)
       fi
     else
-      AC_MSG_RESULT(too old; need Ruby version 1.6.0 or later)
+      AC_MSG_RESULT(too old; need Ruby version 1.9.1 or later)
     fi
   fi