Sha256: 84e825a1dcbaa2d87e6dcece4728fdd5856d2b12ff27814965b2d2331f7ab72d
Contents?: true
Size: 486 Bytes
Versions: 68
Compression:
Stored size: 486 Bytes
Contents
# frozen_string_literal: true require "active_support/time_with_zone" module ActiveSupport module EachTimeWithZone #:nodoc: def each(&block) ensure_iteration_allowed super end def step(n = 1, &block) ensure_iteration_allowed super end private def ensure_iteration_allowed raise TypeError, "can't iterate from #{first.class}" if first.is_a?(TimeWithZone) end end end Range.prepend(ActiveSupport::EachTimeWithZone)
Version data entries
68 entries across 68 versions & 9 rubygems