diff options
author | Maxime Lapointe <hunter_spawn@hotmail.com> | 2017-07-25 09:12:11 -0400 |
---|---|---|
committer | Maxime Lapointe <hunter_spawn@hotmail.com> | 2017-07-25 09:50:27 -0400 |
commit | 6d225a9870aea1fa25ab71774206d08d5b216355 (patch) | |
tree | 40783c0a30112b4c75ae903672e8763c4930fae7 /.gitignore | |
parent | 0e7ce3f4c7c17e72f905b26aff3893149f524888 (diff) | |
download | rails-6d225a9870aea1fa25ab71774206d08d5b216355.tar.gz rails-6d225a9870aea1fa25ab71774206d08d5b216355.tar.bz2 rails-6d225a9870aea1fa25ab71774206d08d5b216355.zip |
Add missing hash, eql?, == to various node classes
Some of the nodes classes are missing either one or many of the common comparison methods #hash, #eql? and #==.
This makes comparision and working with the ast sometimes painful, as equality or operations likes array differences (which uses a hash behind the scene) produces unexpected results.
A test has been added that ensures that every descendants of Node:
* have all 3 methods
* that all 3 methods were defined from the same class
* that the class defining all 3 is also a descendant of Node, to avoid the default ones that rely on identity only
Diffstat (limited to '.gitignore')
0 files changed, 0 insertions, 0 deletions