Sha256: b3dbf8da7d78d4baa71754d9fd0b78615e5ea08e4eb826cf0655aa75c3b6505c

Contents?: true

Size: 196 Bytes

Versions: 176

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

176 entries across 176 versions & 1 rubygems

Version Path
origen-0.59.7 lib/origen/core_ext/range.rb
origen-0.59.6 lib/origen/core_ext/range.rb
origen-0.59.5 lib/origen/core_ext/range.rb
origen-0.59.4 lib/origen/core_ext/range.rb
origen-0.59.3 lib/origen/core_ext/range.rb
origen-0.59.2 lib/origen/core_ext/range.rb
origen-0.59.1 lib/origen/core_ext/range.rb
origen-0.59.0 lib/origen/core_ext/range.rb
origen-0.58.0 lib/origen/core_ext/range.rb
origen-0.57.2 lib/origen/core_ext/range.rb
origen-0.57.1 lib/origen/core_ext/range.rb
origen-0.57.0 lib/origen/core_ext/range.rb
origen-0.56.0 lib/origen/core_ext/range.rb
origen-0.55.5 lib/origen/core_ext/range.rb
origen-0.55.4 lib/origen/core_ext/range.rb
origen-0.55.3 lib/origen/core_ext/range.rb
origen-0.55.2 lib/origen/core_ext/range.rb
origen-0.55.1 lib/origen/core_ext/range.rb
origen-0.55.0 lib/origen/core_ext/range.rb
origen-0.54.6 lib/origen/core_ext/range.rb