RDoc documentation: `Array#&` clarification
In the RDoc documentation for
Array#&, it does not mention whether the order of the elements in the returned array preserves the order in the receiver. There is a question raised regarding this point in stackoverflow:
and it mentions that that is included in the test for RubySpec
so it looks like that is taken for granted, but it is not guaranteed. If it is indeed a feature, then that should be written in the document. If not, (meaning the order might not be preserved in a future implementation), then that should also be mentioned in the document as a warning. The documentation for
Array#- makes that point clear:
Array Difference---Returns a new array that is a copy of the original array, removing any items that ...
so, perhaps the docmentation for
Array#& should be written along the same line.
- array.c (rb_ary_diff, rb_ary_and, rb_ary_or): Document return order [RubySpec #7803
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39415 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
merge revision(s) 39415:
* array.c (rb_ary_diff, rb_ary_and, rb_ary_or): Document return order [RubySpec #7803]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@39664 b2dd03c8-39d4-4d8f-98ff-823fe69b080e