diff options
author | eregon <eregon@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-07-09 13:25:57 +0000 |
---|---|---|
committer | eregon <eregon@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-07-09 13:25:57 +0000 |
commit | 59d1fc36154b3a604d277d5a9a0d46f4310dad3c (patch) | |
tree | 3125f11e805831833d0abe6421b7bf71e71a3591 /object.c | |
parent | 0c620c2ec3622d2a8dfb71e85e7537fe09ba46ac (diff) |
* object.c (rb_obj_cmp): Improve doc for Kernel#<=>
to clarify #equal? is not called. [See GH-352]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41867 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'object.c')
-rw-r--r-- | object.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -1375,7 +1375,8 @@ rb_obj_not_match(VALUE obj1, VALUE obj2) * call-seq: * obj <=> other -> 0 or nil * - * Returns 0 if obj.equal?(other) or obj == other, otherwise nil. + * Returns 0 if +obj+ and +other+ are the same object + * or <code>obj == other</code>, otherwise nil. * * The <=> is used by various methods to compare objects, for example * Enumerable#sort, Enumerable#max etc. @@ -1385,7 +1386,7 @@ rb_obj_not_match(VALUE obj1, VALUE obj2) * 1 means self is bigger than other. Nil means the two values could not be * compared. * - * When you defined <=>, you can include Comparable to gain the methods <=, <, + * When you define <=>, you can include Comparable to gain the methods <=, <, * ==, >=, > and between?. */ static VALUE |