array.c: improve docs for Array#difference

* array.c: [DOC] small doc fixes for Array#difference and Array#-.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65184 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
stomar 2018-10-19 21:26:15 +00:00
parent 62c3610583
commit 1411b7f934

10
array.c
View File

@ -4189,7 +4189,7 @@ ary_recycle_hash(VALUE hash)
* *
* If you need set-like behavior, see the library class Set. * If you need set-like behavior, see the library class Set.
* *
* See Array#difference. * See also Array#difference.
*/ */
static VALUE static VALUE
@ -4226,9 +4226,9 @@ rb_ary_diff(VALUE ary1, VALUE ary2)
* *
* Array Difference * Array Difference
* *
* Returns a new array that is a copy of +self+, removing any items * Returns a new array that is a copy of the receiver, removing any items
* that also appear in any of the <code>other_ary</code>s. The order of +self+ is * that also appear in any of the arrays given as arguments.
* preserved. * The order is preserved from the original array.
* *
* It compares elements using their #hash and #eql? methods for efficiency. * It compares elements using their #hash and #eql? methods for efficiency.
* *
@ -4237,7 +4237,7 @@ rb_ary_diff(VALUE ary1, VALUE ary2)
* *
* If you need set-like behavior, see the library class Set. * If you need set-like behavior, see the library class Set.
* *
* See Array#-. * See also Array#-.
*/ */
static VALUE static VALUE