Sha256: 8ce463bc395c583244fa865c096d5c1b47c9554e1f5ff78194916ce4edc09fd9
Contents?: true
Size: 522 Bytes
Versions: 5
Compression:
Stored size: 522 Bytes
Contents
module Appraisal # An ordered hash implementation for Ruby 1.8.7 compatibility. This is not # a complete implementation, but it covers Appraisal's specific needs. class OrderedHash < ::Hash # Hashes are ordered in Ruby 1.9. if RUBY_VERSION < '1.9' def initialize(*args, &block) super @keys = [] end def []=(key, value) @keys << key unless has_key?(key) super end def values @keys.collect { |key| self[key] } end end end end
Version data entries
5 entries across 5 versions & 3 rubygems