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-1.1.0 lib/ruby-next/core/enumerable/filter.rb
ruby-next-core-1.0.3 lib/ruby-next/core/enumerable/filter.rb
ruby-next-core-1.0.2 lib/ruby-next/core/enumerable/filter.rb
ruby-next-core-1.0.1 lib/ruby-next/core/enumerable/filter.rb
ruby-next-core-1.0.0 lib/ruby-next/core/enumerable/filter.rb
ruby-next-core-1.0.0.rc.1 lib/ruby-next/core/enumerable/filter.rb
ruby-next-core-0.15.3 lib/ruby-next/core/enumerable/filter.rb
ruby-next-core-0.15.2 lib/ruby-next/core/enumerable/filter.rb
ruby-next-core-0.15.1 lib/ruby-next/core/enumerable/filter.rb
ruby-next-core-0.15.0 lib/ruby-next/core/enumerable/filter.rb
ruby-next-core-0.14.1 lib/ruby-next/core/enumerable/filter.rb
ruby-next-core-0.14.0 lib/ruby-next/core/enumerable/filter.rb
ruby-next-core-0.13.3 lib/ruby-next/core/enumerable/filter.rb
ruby-next-core-0.13.2 lib/ruby-next/core/enumerable/filter.rb
ruby-next-core-0.13.1 lib/ruby-next/core/enumerable/filter.rb
ruby-next-core-0.13.0 lib/ruby-next/core/enumerable/filter.rb
ruby-next-core-0.12.0 lib/ruby-next/core/enumerable/filter.rb
ruby-next-core-0.11.1 lib/ruby-next/core/enumerable/filter.rb
ruby-next-core-0.11.0 lib/ruby-next/core/enumerable/filter.rb
ruby-next-core-0.10.5 lib/ruby-next/core/enumerable/filter.rb