Sha256: 42f92ed759be80c9e5617b526763e6220b44df7825f73b28bc8d94c0c051e926

Contents?: true

Size: 389 Bytes

Versions: 161

Compression:

Stored size: 389 Bytes

Contents

# frozen_string_literal: true

module RuboCop
  module AST
    module Ext
      # Refinement to circumvent broken `Range#minmax` for infinity ranges in 2.6-
      module RangeMinMax
        if ::Range.instance_method(:minmax).owner != ::Range
          refine ::Range do
            def minmax
              [min, max]
            end
          end
        end
      end
    end
  end
end

Version data entries

161 entries across 155 versions & 22 rubygems

Version Path
rubocop-ast-1.2.0 lib/rubocop/ast/ext/range_min_max.rb