module Concurrent::Utility::EngineDetector
def ruby_version(version = RUBY_VERSION, comparison, major, minor, patch)
def ruby_version(version = RUBY_VERSION, comparison, major, minor, patch) result = (version.split('.').map(&:to_i) <=> [major, minor, patch]) comparisons = { :== => [0], :>= => [1, 0], :<= => [-1, 0], :> => [1], :< => [-1] } comparisons.fetch(comparison).include? result end