Issue #7377 has been updated by trans (Thomas Sawyer).


=begin
The reason for the word "identical" is b/c of the root "id" which corresponds to the fact that the id's are the same. They would not be identical if the id's were not the same. So yes, "exactly alike" is precise. Only the identical object is exactly like itself. Remember too we are comparing two references, not the objects themselves. We are really asking if reference x is identical to reference y.

Also, the #same_object? seems redundant b/c everything is an object. So if an alternate is to be suggested, I would think it should just be (({#same?})). It would suffice, but does just "same?" really have such a precise meaning?
=end

----------------------------------------
Feature #7377: #indetical? as an alias for #equal?
https://bugs.ruby-lang.org/issues/7377#change-33360

Author: aef (Alexander E. Fischer)
Status: Open
Priority: Normal
Assignee: matz (Yukihiro Matsumoto)
Category: core
Target version: 


As my feature request #7359 got rejected, here a more backward-compatible approach:

In my opinion the difference between #eql? and #equal? is really unintuitive. How about making their difference more obvious by giving one of them a more accurate name? 

My proposal is to alias #equal? to #identical?.

I'll write a patch, if this is acceptable.


-- 
http://bugs.ruby-lang.org/