Sha256: 37dbf6b593179d89f37cbdf9ad284d73e4f82f288c8aa2736bc4c6c45044f41e
Contents?: true
Size: 539 Bytes
Versions: 16
Compression:
Stored size: 539 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
16 entries across 16 versions & 1 rubygems