1. == test whether the value between two objects is the same.
2. equal test whether two objects are the same in ruby. (ie. whether they share the same object_id)
3. === test for equality in value , especially useful for Ranges. It is used implicitly in case statement
4. eql? is used in Hash to test whether the key and value are the same.
2. equal test whether two objects are the same in ruby. (ie. whether they share the same object_id)
3. === test for equality in value , especially useful for Ranges. It is used implicitly in case statement
4. eql? is used in Hash to test whether the key and value are the same.
Comments
Post a Comment