Sha256: ca5aa6c9cdf1b0fc1a5afc0a6e8b7fb91acdccf96df2468bce62c0b2c24ca52f

Contents?: true

Size: 307 Bytes

Versions: 14

Compression:

Stored size: 307 Bytes

Contents

# frozen_string_literal: true

RubyNext::Core.patch String, method: :split, version: "2.6", supported: ("a b".split(" ", &proc {}) == "a b"), core_ext: :prepend do
  <<~RUBY
    def split(*args, &block)
      return super unless block_given?
      super.each { |el| yield el }
      self
    end
  RUBY
end

Version data entries

14 entries across 14 versions & 2 rubygems

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