aboutsummaryrefslogtreecommitdiffstats
path: root/guides
diff options
context:
space:
mode:
authorGuillermo Iguaran <guilleiguaran@gmail.com>2013-05-01 09:15:31 -0700
committerGuillermo Iguaran <guilleiguaran@gmail.com>2013-05-01 09:15:31 -0700
commitf7f8b7ccfc2fe61c0834041d2e211dd9dfdfbbc8 (patch)
tree247124f4bbd7e1e8d84275b848e40303ac05262a /guides
parent630d2e4e38f06b3998c663aa3e3bbd554ec2a78b (diff)
parent62c62bc360bf1ce3db0a11be47a974fcc0777362 (diff)
downloadrails-f7f8b7ccfc2fe61c0834041d2e211dd9dfdfbbc8.tar.gz
rails-f7f8b7ccfc2fe61c0834041d2e211dd9dfdfbbc8.tar.bz2
rails-f7f8b7ccfc2fe61c0834041d2e211dd9dfdfbbc8.zip
Merge pull request #10394 from BMorearty/remove-varargs-from-in
Remove varargs from `Object#in?`
Diffstat (limited to 'guides')
-rw-r--r--guides/source/active_support_core_extensions.md3
1 files changed, 1 insertions, 2 deletions
diff --git a/guides/source/active_support_core_extensions.md b/guides/source/active_support_core_extensions.md
index 54f4b79b3b..6daad33dea 100644
--- a/guides/source/active_support_core_extensions.md
+++ b/guides/source/active_support_core_extensions.md
@@ -476,12 +476,11 @@ NOTE: Defined in `active_support/core_ext/kernel/reporting.rb`.
### `in?`
-The predicate `in?` tests if an object is included in another object or a list of objects. An `ArgumentError` exception will be raised if a single argument is passed and it does not respond to `include?`.
+The predicate `in?` tests if an object is included in another object. An `ArgumentError` exception will be raised if the argument passed does not respond to `include?`.
Examples of `in?`:
```ruby
-1.in?(1,2) # => true
1.in?([1,2]) # => true
"lo".in?("hello") # => true
25.in?(30..50) # => false