Sha256: fbe4e9274c6cefe6f7513dc2bea0565d85e59675d162df76ea1d621b89a27b86
Contents?: true
Size: 596 Bytes
Versions: 19
Compression:
Stored size: 596 Bytes
Contents
module ActiveSupport #:nodoc: module CoreExtensions #:nodoc: module Range #:nodoc: # Return an array when step is called without a block. module BlocklessStep def self.included(base) #:nodoc: base.alias_method_chain :step, :blockless end def step_with_blockless(value, &block) if block_given? step_without_blockless(value, &block) else returning [] do |array| step_without_blockless(value) { |step| array << step } end end end end end end end
Version data entries
19 entries across 19 versions & 4 rubygems