Sha256: b3dbf8da7d78d4baa71754d9fd0b78615e5ea08e4eb826cf0655aa75c3b6505c

Contents?: true

Size: 196 Bytes

Versions: 175

Compression:

Stored size: 196 Bytes

Contents

class Range
  def reverse
    first = self.first
    last = self.last
    last..first
  end

  def to_a
    a = super
    if a.empty?
      reverse.to_a.reverse
    else
      a
    end
  end
end

Version data entries

175 entries across 175 versions & 1 rubygems

Version Path
origen-0.60.18 lib/origen/core_ext/range.rb
origen-0.60.17 lib/origen/core_ext/range.rb
origen-0.60.16 lib/origen/core_ext/range.rb
origen-0.60.14 lib/origen/core_ext/range.rb
origen-0.60.13 lib/origen/core_ext/range.rb
origen-0.60.12 lib/origen/core_ext/range.rb
origen-0.60.11 lib/origen/core_ext/range.rb
origen-0.60.10 lib/origen/core_ext/range.rb
origen-0.60.9 lib/origen/core_ext/range.rb
origen-0.60.8 lib/origen/core_ext/range.rb
origen-0.60.7 lib/origen/core_ext/range.rb
origen-0.60.6 lib/origen/core_ext/range.rb
origen-0.60.5 lib/origen/core_ext/range.rb
origen-0.60.4 lib/origen/core_ext/range.rb
origen-0.60.3 lib/origen/core_ext/range.rb
origen-0.60.2 lib/origen/core_ext/range.rb
origen-0.60.1 lib/origen/core_ext/range.rb
origen-0.60.0 lib/origen/core_ext/range.rb
origen-0.59.8 lib/origen/core_ext/range.rb
origen-0.59.7 lib/origen/core_ext/range.rb