Value equality
Closed this issue · 3 comments
swanandp commented
Struct
also provides a built in value based equality:
Person = Struct.new(:name, :age)
john = Person.new("john", 20)
not_jake = Person.new("john", 20)
john == not_jake # true
ImmutableStruct
currently breaks this behaviour ( or more appropriately, doesn't offer this feature ).
simeonwillbanks commented
billeisenhauer commented
Closing. Thanks @swanandp for reporting the issue!
swanandp commented
Cool, thanks for adding this!