Skip to content

Commit 87efbc7

Browse files
committed
Complete block hash semantics
1 parent 5de6ecd commit 87efbc7

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

lib/rbs/types.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1407,6 +1407,12 @@ def ==(other)
14071407
other.self_type == self_type
14081408
end
14091409

1410+
alias eql? ==
1411+
1412+
def hash
1413+
self.class.hash ^ type.hash ^ required.hash ^ self_type.hash
1414+
end
1415+
14101416
def to_json(state = nil)
14111417
{
14121418
type: type,

0 commit comments

Comments
 (0)