Sha256: e0e230fa83f9595e44e85f6313d63baa316d48a185ac7e8b99c41c01bf56dc0f

Contents?: true

Size: 463 Bytes

Versions: 4

Compression:

Stored size: 463 Bytes

Contents

# Common spec-related code goes here

STACK_OVERFLOW_DEPTH = if RUBY_VERSION =~ /^ruby /
  def calculate_stack_overflow_depth(n)
    calculate_stack_overflow_depth(n + 1)
  rescue SystemStackError
    n
  end
  calculate_stack_overflow_depth(2)
else
  0
end

class DeterministicHash

  def initialize(value, hash)
    @value = value
    @hash = hash
  end

  def to_s
    @value.to_s
  end

  def inspect
    @value.inspect
  end

  def hash
    @hash
  end

end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
hamster-0.3.10 spec/spec_helper.rb
hamster-0.3.9 spec/spec_helper.rb
hamster-0.3.8 spec/spec_helper.rb
hamster-0.3.7 spec/spec_helper.rb