Felix Frank
if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('3.4.0') error_pattern = '...' else ...