From c7a37c10ade8372c712be01a7e4ddbe8785c5139 Mon Sep 17 00:00:00 2001 From: Todd Bealmear Date: Sun, 1 Mar 2015 17:44:36 -0800 Subject: Add Enumerable#without --- guides/source/active_support_core_extensions.md | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'guides') 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` --------------------- -- cgit v1.2.3