Sha256: e0bfe5ca4c41640d3fd62607c6a5a49c9bd109a2b3219f4fe11d9b8f51818404

Contents?: true

Size: 556 Bytes

Versions: 10

Compression:

Stored size: 556 Bytes

Contents

class MyHash < hash_class; end

class NewHash < hash_class
  def initialize(*args)
    super(0)
    args.each_with_index do |val, index|
      self[index] = val
    end
  end
end

class DefaultHash < hash_class
  def default(key)
    100
  end
end

class ToHashHash < Hash
  def to_hash
    new_hash "to_hash" => "was", "called!" => "duh."
  end
end

module HashSpecs
  def self.empty_frozen_hash
    @empty ||= new_hash
    @empty.freeze
    @empty
  end

  def self.frozen_hash
    @hash ||= new_hash(1 => 2, 3 => 4)
    @hash.freeze
    @hash
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
jactive_support-2.1.2 spec/java_ext/map/fixtures/classes.rb
jactive_support-3.0.0 spec/java_ext/map/fixtures/classes.rb
jactive_support-3.0.0.pre2 spec/java_ext/map/fixtures/classes.rb
jactive_support-3.0.0.pre1 spec/java_ext/map/fixtures/classes.rb
jactive_support-2.1.1 spec/java_ext/map/fixtures/classes.rb
jactive_support-2.1.0 spec/java_ext/map/fixtures/classes.rb
jactive_support-2.0.0 spec/java_ext/map/fixtures/classes.rb
jactive_support-1.0.2 spec/java_ext/map/fixtures/classes.rb
jactive_support-1.0.1-universal-java-1.6 spec/java_ext/map/fixtures/classes.rb
jactive_support-1.0.0-universal-java-1.6 spec/java_ext/map/fixtures/classes.rb