aboutsummaryrefslogtreecommitdiffstats
path: root/guides
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2015-03-01 19:05:47 -0800
committerDavid Heinemeier Hansson <david@loudthinking.com>2015-03-01 19:05:47 -0800
commitfc91616a4e6c953c419cccbce2ec7a3e1c0e3941 (patch)
tree52b368ecc24bde879cedaebf75783d4192b83d3a /guides
parent3a156ec8e79b88ff90e8f5ed34dd05b89e94b72f (diff)
parentc7a37c10ade8372c712be01a7e4ddbe8785c5139 (diff)
downloadrails-fc91616a4e6c953c419cccbce2ec7a3e1c0e3941.tar.gz
rails-fc91616a4e6c953c419cccbce2ec7a3e1c0e3941.tar.bz2
rails-fc91616a4e6c953c419cccbce2ec7a3e1c0e3941.zip
Merge pull request #19157 from todd/enumerable_without
Add Enumerable#without
Diffstat (limited to 'guides')
-rw-r--r--guides/source/active_support_core_extensions.md11
1 files changed, 11 insertions, 0 deletions
diff --git a/guides/source/active_support_core_extensions.md b/guides/source/active_support_core_extensions.md
index 2e7f776319..66626f41d1 100644
--- a/guides/source/active_support_core_extensions.md
+++ b/guides/source/active_support_core_extensions.md
@@ -2182,6 +2182,17 @@ to_visit << node if visited.exclude?(node)
NOTE: Defined in `active_support/core_ext/enumerable.rb`.
+### `without`
+
+The method `without` returns a copy of an enumerable with the specified elements
+removed:
+
+```ruby
+people.without("Aaron", "Todd")
+```
+
+NOTE: Defined in `active_support/core_ext/enumerable.rb`.
+
Extensions to `Array`
---------------------