Sha256: da44dded634d04715b046bbfe00513b251f1fc35dbf54fa07bc31fe3c5129e60

Contents?: true

Size: 571 Bytes

Versions: 14

Compression:

Stored size: 571 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

14 entries across 14 versions & 2 rubygems

Version Path
ruby-next-core-0.9.2 lib/ruby-next/core/enumerable/filter.rb
ruby-next-core-0.9.1 lib/ruby-next/core/enumerable/filter.rb
ruby-next-core-0.9.0 lib/ruby-next/core/enumerable/filter.rb
ruby-next-core-0.9.0.pre lib/ruby-next/core/enumerable/filter.rb
ruby-next-core-0.8.0 lib/ruby-next/core/enumerable/filter.rb
ruby-next-core-0.7.0 lib/ruby-next/core/enumerable/filter.rb
ruby-next-core-0.6.0 lib/ruby-next/core/enumerable/filter.rb
ruby-next-core-0.5.3 lib/ruby-next/core/enumerable/filter.rb
ruby-next-core-0.5.2 lib/ruby-next/core/enumerable/filter.rb
ruby-next-core-0.5.1 lib/ruby-next/core/enumerable/filter.rb
ruby-next-core-0.5.0 lib/ruby-next/core/enumerable/filter.rb
ruby-next-core-0.4.0 lib/ruby-next/core/enumerable/filter.rb
ruby-next-0.3.0 lib/ruby-next/core/enumerable/filter.rb
ruby-next-core-0.3.0 lib/ruby-next/core/enumerable/filter.rb