Sha256: 85a2abd0ad472974271806ac60df2fc03702041509044a7d27934522f78379fa

Contents?: true

Size: 551 Bytes

Versions: 25

Compression:

Stored size: 551 Bytes

Contents

# frozen_string_literal: true

RubyNext::Core.patch Enumerable, method: :filter, version: "2.6" do
  <<-RUBY
alias filter select
  RUBY
end

# Refine Array seprately, 'cause refining modules is vulnerable to prepend:
# - https://bugs.ruby-lang.org/issues/13446
#
# Also, Array also have `filter!`
RubyNext::Core.patch Array, method: :filter!, version: "2.6" do
  <<-RUBY
alias filter select
alias filter! select!
  RUBY
end

RubyNext::Core.patch Hash, method: :filter!, version: "2.6" do
  <<-RUBY
alias filter select
alias filter! select!
  RUBY
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
ruby-next-core-0.10.4 lib/ruby-next/core/enumerable/filter.rb
ruby-next-core-0.10.3 lib/ruby-next/core/enumerable/filter.rb
ruby-next-core-0.10.2 lib/ruby-next/core/enumerable/filter.rb
ruby-next-core-0.10.1 lib/ruby-next/core/enumerable/filter.rb
ruby-next-core-0.10.0 lib/ruby-next/core/enumerable/filter.rb