ruby-changes:37798
From: hsbt <ko1@a...>
Date: Sat, 7 Mar 2015 09:36:13 +0900 (JST)
Subject: [ruby-changes:37798] hsbt:r49879 (trunk): * array.c: document that first element is kept when using
hsbt 2015-03-07 09:36:09 +0900 (Sat, 07 Mar 2015) New Revision: 49879 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=49879 Log: * array.c: document that first element is kept when using Array#uniq and #uniq! [fix GH-845][ci skip] Patch by @riffraff Modified files: trunk/ChangeLog trunk/array.c Index: array.c =================================================================== --- array.c (revision 49878) +++ array.c (revision 49879) @@ -4181,6 +4181,8 @@ push_value(st_data_t key, st_data_t val, https://github.com/ruby/ruby/blob/trunk/array.c#L4181 * * 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) https://github.com/ruby/ruby/blob/trunk/array.c#L4238 * * 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"] * Index: ChangeLog =================================================================== --- ChangeLog (revision 49878) +++ ChangeLog (revision 49879) @@ -1,3 +1,9 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Sat Mar 7 09:36:05 2015 SHIBATA Hiroshi <shibata.hiroshi@g...> + + * 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@g...> * thread.c: Mutex#owned? is no longer experimental since 2.1.0 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/