diff options
Diffstat (limited to 'lib/enumerable.rb')
-rw-r--r-- | lib/enumerable.rb | 26 |
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 |