mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* array.c: document that first element is kept when using
Array#uniq and #uniq! [fix GH-845][ci skip] Patch by @riffraff git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49879 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
6271eea522
commit
05d1196203
2 changed files with 10 additions and 0 deletions
|
@ -1,3 +1,9 @@
|
|||
Sat Mar 7 09:36:05 2015 SHIBATA Hiroshi <shibata.hiroshi@gmail.com>
|
||||
|
||||
* array.c: document that first element is kept when using
|
||||
Array#uniq and #uniq! [fix GH-845][ci skip]
|
||||
Patch by @riffraff
|
||||
|
||||
Sat Mar 7 09:28:02 2015 SHIBATA Hiroshi <shibata.hiroshi@gmail.com>
|
||||
|
||||
* thread.c: Mutex#owned? is no longer experimental since 2.1.0
|
||||
|
|
4
array.c
4
array.c
|
@ -4181,6 +4181,8 @@ push_value(st_data_t key, st_data_t val, st_data_t ary)
|
|||
*
|
||||
* It compares values using their #hash and #eql? methods for efficiency.
|
||||
*
|
||||
* +self+ is traversed in order, and the first occurrence is kept.
|
||||
*
|
||||
* Returns +nil+ if no changes are made (that is, no duplicates are found).
|
||||
*
|
||||
* a = [ "a", "a", "b", "b", "c" ]
|
||||
|
@ -4236,6 +4238,8 @@ rb_ary_uniq_bang(VALUE ary)
|
|||
*
|
||||
* It compares values using their #hash and #eql? methods for efficiency.
|
||||
*
|
||||
* +self+ is traversed in order, and the first occurrence is kept.
|
||||
*
|
||||
* a = [ "a", "a", "b", "b", "c" ]
|
||||
* a.uniq # => ["a", "b", "c"]
|
||||
*
|
||||
|
|
Loading…
Add table
Reference in a new issue