149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
|
# File 'src/ruby/ext/grpc/extconf.rb', line 149
def have_ruby_abi_version()
return true if RUBY_ENGINE == 'truffleruby'
return false if RUBY_PATCHLEVEL >= 0
m = /(\d+)\.(\d+)/.match(RUBY_VERSION)
if m.nil?
puts "Failed to parse ruby version: #{RUBY_VERSION}. Assuming ruby_abi_version symbol is NOT present."
return false
end
major = m[1].to_i
minor = m[2].to_i
if major >= 3 and minor >= 2
puts "Ruby version #{RUBY_VERSION} >= 3.2. Assuming ruby_abi_version symbol is present."
return true
end
puts "Ruby version #{RUBY_VERSION} < 3.2. Assuming ruby_abi_version symbol is NOT present."
false
end
|