From: "marcandre (Marc-Andre Lafortune)" Date: 2012-11-21T13:20:17+09:00 Subject: [ruby-core:49795] [ruby-trunk - Feature #7377] #indetical? as an alias for #equal? Issue #7377 has been updated by marcandre (Marc-Andre Lafortune). trans (Thomas Sawyer) wrote: > =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. Identical twins are not the same person (i.e. not the same object), and calling `SomeActiveRecordModel.first` twice will not give you the same object even if they share the same `id` and values. > 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? You clearly have never been to Tha��land ;-) 'object' is not redundant, since one can compare sameness in different ways, by value being the most popular. See also https://bugs.ruby-lang.org/issues/6367 for another proposed use of `same?` ---------------------------------------- Feature #7377: #indetical? as an alias for #equal? https://bugs.ruby-lang.org/issues/7377#change-33376 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/