Blob Blame History Raw
diff -uNr a/plugins/rack/uwsgiplugin.py b/plugins/rack/uwsgiplugin.py
--- a/plugins/rack/uwsgiplugin.py	2023-06-13 22:05:49.685878391 +0200
+++ b/plugins/rack/uwsgiplugin.py	2023-06-13 22:07:22.640425653 +0200
@@ -10,11 +10,11 @@
 rbconfig = 'Config'
 
 version = os.popen(RUBYPATH + " -e \"print RUBY_VERSION\"").read().rstrip()
-v = version.split('.')
+v = tuple(int(x) for x in version.split('.'))
 
 GCC_LIST = ['rack_plugin', 'rack_api']
 
-if (v[0] == '1' and v[1] == '9') or v[0] >= '2':
+if v >= (1, 9):
     CFLAGS = os.popen(RUBYPATH + " -e \"require 'rbconfig';print RbConfig::CONFIG['CFLAGS']\"").read().rstrip().split()
     CFLAGS.append('-DRUBY19')
     CFLAGS.append('-Wno-unused-parameter')
diff -uNr a/plugins/ruby19/uwsgiplugin.py b/plugins/ruby19/uwsgiplugin.py
--- a/plugins/ruby19/uwsgiplugin.py	2023-06-13 22:05:49.685878391 +0200
+++ b/plugins/ruby19/uwsgiplugin.py	2023-06-13 22:07:13.470371664 +0200
@@ -10,11 +10,11 @@
 rbconfig = 'Config'
 
 version = os.popen(RUBYPATH + " -e \"print RUBY_VERSION\"").read().rstrip()
-v = version.split('.')
+v = tuple(int(x) for x in version.split('.'))
 
 GCC_LIST = ['../rack/rack_plugin', '../rack/rack_api']
 
-if v[0] == '1' and v[1] == '9':
+if v >= (1, 9):
     CFLAGS = os.popen(RUBYPATH + " -e \"require 'rbconfig';print RbConfig::CONFIG['CFLAGS']\"").read().rstrip().split()
     CFLAGS.append('-DRUBY19')
     CFLAGS.append('-Wno-unused-parameter')