mirror of
https://gitea.invidious.io/iv-org/shard-spectator.git
synced 2024-08-15 00:53:35 +00:00
Use class name instead of hash of type
Hash of type could collide, though unlikely.
This commit is contained in:
parent
0471794814
commit
e0d12e9d0d
1 changed files with 3 additions and 3 deletions
|
@ -2,7 +2,7 @@ module Spectator::Mocks
|
|||
module Registry
|
||||
extend self
|
||||
|
||||
alias Key = Tuple(UInt64, UInt64)
|
||||
alias Key = Tuple(String, UInt64)
|
||||
|
||||
private struct Entry
|
||||
getter stubs = Deque(MethodStub).new
|
||||
|
@ -47,11 +47,11 @@ module Spectator::Mocks
|
|||
end
|
||||
|
||||
private def unique_key(reference : Reference)
|
||||
{reference.class.hash, reference.object_id}
|
||||
{reference.class.name, reference.object_id}
|
||||
end
|
||||
|
||||
private def unique_key(value : Value)
|
||||
{value.class.hash, value.hash}
|
||||
{value.class.name, value.hash}
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue