Sha256: 7b3e427389e68e3224ed36d7eef3da4880b4c33ba2706d1d6cb6aa0f15b2dfcd
Contents?: true
Size: 579 Bytes
Versions: 14
Compression:
Stored size: 579 Bytes
Contents
# frozen_string_literal: true # rubocop:disable Style/LambdaCall RubyNext::Core.patch Proc, name: "ProcCompose", method: :<<, version: "2.6" do <<~RUBY def <<(other) raise TypeError, "callable object is expected" unless other.respond_to?(:call) this = self proc { |*args, &block| this.(other.(*args, &block)) } end def >>(other) raise TypeError, "callable object is expected" unless other.respond_to?(:call) this = self proc { |*args, &block| other.(this.(*args, &block)) } end RUBY end # rubocop:enable Style/LambdaCall
Version data entries
14 entries across 14 versions & 2 rubygems