Remove support for Ruby 2.6 (#21477)

As pointed out by https://github.com/mastodon/mastodon/pull/21297#discussion_r1028372193
at least one of our dependencies already dropped support for Ruby 2.6, and we
had removed Ruby 2.6 tests from the CI over a year ago (#16861).

So stop advertising Ruby 2.6 support, bump targeted version, and drop some
compatibility code.
This commit is contained in:
Claire 2022-11-27 20:41:39 +01:00 committed by GitHub
parent 47f0d7021e
commit 098ced7420
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 3 additions and 30 deletions

View file

@ -1,26 +0,0 @@
# frozen_string_literal: true
module Enumerable
# TODO: Remove this once stop to support Ruby 2.6
if RUBY_VERSION < '2.7.0'
def filter_map
if block_given?
result = []
each do |element|
res = yield element
result << res if res
end
result
else
Enumerator.new do |yielder|
result = []
each do |element|
res = yielder.yield element
result << res if res
end
result
end
end
end
end
end