about summary refs log tree commit diff
path: root/lib
diff options
context:
space:
mode:
authorClaire <claire.github-309c@sitedethib.com>2022-11-27 20:41:39 +0100
committerGitHub <noreply@github.com>2022-11-27 20:41:39 +0100
commit098ced7420065149feec732f979402afe2573d60 (patch)
tree306e7638cbb8016d6dae79f6c976fd76705d6aaf /lib
parent47f0d7021e76c60f5336b0c005c6336cd50c8009 (diff)
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.
Diffstat (limited to 'lib')
-rw-r--r--lib/enumerable.rb26
1 files changed, 0 insertions, 26 deletions
diff --git a/lib/enumerable.rb b/lib/enumerable.rb
deleted file mode 100644
index 66918f65e..000000000
--- a/lib/enumerable.rb
+++ /dev/null
@@ -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