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.33.1 lib/origen/core_ext/range.rb
origen-0.33.0 lib/origen/core_ext/range.rb
origen-0.32.1 lib/origen/core_ext/range.rb
origen-0.32.0 lib/origen/core_ext/range.rb
origen-0.31.0 lib/origen/core_ext/range.rb
origen-0.30.0 lib/origen/core_ext/range.rb
origen-0.29.0 lib/origen/core_ext/range.rb
origen-0.28.2 lib/origen/core_ext/range.rb
origen-0.28.1 lib/origen/core_ext/range.rb
origen-0.28.0 lib/origen/core_ext/range.rb
origen-0.27.0 lib/origen/core_ext/range.rb
origen-0.26.0 lib/origen/core_ext/range.rb
origen-0.25.1 lib/origen/core_ext/range.rb
origen-0.25.0 lib/origen/core_ext/range.rb
origen-0.24.0 lib/origen/core_ext/range.rb
origen-0.23.0 lib/origen/core_ext/range.rb
origen-0.22.0 lib/origen/core_ext/range.rb
origen-0.21.0 lib/origen/core_ext/range.rb
origen-0.20.3 lib/origen/core_ext/range.rb
origen-0.20.2 lib/origen/core_ext/range.rb