diff options
author | Ryuta Kamizono <kamipo@gmail.com> | 2019-03-31 08:38:37 +0900 |
---|---|---|
committer | Ryuta Kamizono <kamipo@gmail.com> | 2019-03-31 08:38:37 +0900 |
commit | b89a3e7e638a50c648a17d09c48b49b707e1d90d (patch) | |
tree | 67c403d84bc17d591692610134e63ade5305761c /activesupport/lib | |
parent | 2bf55179813190f2a79509383e21c2b43e72f4c2 (diff) | |
download | rails-b89a3e7e638a50c648a17d09c48b49b707e1d90d.tar.gz rails-b89a3e7e638a50c648a17d09c48b49b707e1d90d.tar.bz2 rails-b89a3e7e638a50c648a17d09c48b49b707e1d90d.zip |
Tweaks CHANGELOGs and docs [ci skip]
* add leading `#` before `=>` since hash rocket is valid Ruby code
* add backticks
* remove trailing spaces
* and more
Diffstat (limited to 'activesupport/lib')
-rw-r--r-- | activesupport/lib/active_support/core_ext/array/access.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/activesupport/lib/active_support/core_ext/array/access.rb b/activesupport/lib/active_support/core_ext/array/access.rb index 10e4c6b09d..ea01e5891c 100644 --- a/activesupport/lib/active_support/core_ext/array/access.rb +++ b/activesupport/lib/active_support/core_ext/array/access.rb @@ -31,16 +31,16 @@ class Array # Returns a new array that includes the passed elements. # - # [ 1, 2, 3 ].including(4, 5) => [ 1, 2, 3, 4, 5 ] - # [ [ 0, 1 ] ].including([ [ 1, 0 ] ]) => [ [ 0, 1 ], [ 1, 0 ] ] + # [ 1, 2, 3 ].including(4, 5) # => [ 1, 2, 3, 4, 5 ] + # [ [ 0, 1 ] ].including([ [ 1, 0 ] ]) # => [ [ 0, 1 ], [ 1, 0 ] ] def including(*elements) self + elements.flatten(1) end # Returns a copy of the Array excluding the specified elements. # - # ["David", "Rafael", "Aaron", "Todd"].excluding("Aaron", "Todd") => ["David", "Rafael"] - # [ [ 0, 1 ], [ 1, 0 ] ].excluding([ [ 1, 0 ] ]) => [ [ 0, 1 ] ] + # ["David", "Rafael", "Aaron", "Todd"].excluding("Aaron", "Todd") # => ["David", "Rafael"] + # [ [ 0, 1 ], [ 1, 0 ] ].excluding([ [ 1, 0 ] ]) # => [ [ 0, 1 ] ] # # Note: This is an optimization of <tt>Enumerable#excluding</tt> that uses <tt>Array#-</tt> # instead of <tt>Array#reject</tt> for performance reasons. |