@@ -6212,25 +6212,28 @@ rb_ary_uniq_bang(VALUE ary)
6212
6212
6213
6213
/*
6214
6214
* call-seq:
6215
- * array. uniq -> new_array
6216
- * array. uniq {|element| ... } -> new_array
6215
+ * uniq -> new_array
6216
+ * uniq {|element| ... } -> new_array
6217
6217
*
6218
- * Returns a new +Array+ containing those elements from +self+ that are not duplicates,
6218
+ * Returns a new array containing those elements from +self+ that are not duplicates,
6219
6219
* the first occurrence always being retained.
6220
6220
*
6221
- * With no block given, identifies and omits duplicates using method <tt>eql?</tt>
6222
- * to compare:
6221
+ * With no block given, identifies and omits duplicate elements using method <tt>eql?</tt>
6222
+ * to compare elements :
6223
6223
*
6224
6224
* a = [0, 0, 1, 1, 2, 2]
6225
6225
* a.uniq # => [0, 1, 2]
6226
6226
*
6227
6227
* With a block given, calls the block for each element;
6228
- * identifies (using method <tt>eql?</tt>) and omits duplicate values,
6229
- * that is, those elements for which the block returns the same value:
6228
+ * identifies and omits "duplicate" elements using method <tt>eql?</tt>
6229
+ * to compare <i>block return values</i>;
6230
+ * that is, an element is a duplicate if its block return value
6231
+ * is the same as that of a previous element:
6230
6232
*
6231
6233
* a = ['a', 'aa', 'aaa', 'b', 'bb', 'bbb']
6232
6234
* a.uniq {|element| element.size } # => ["a", "aa", "aaa"]
6233
6235
*
6236
+ * Related: {Methods for Fetching}[rdoc-ref:Array@Methods+for+Fetching].
6234
6237
*/
6235
6238
6236
6239
static VALUE
0 commit comments