aboutsummaryrefslogtreecommitdiffstats
path: root/railties/guides/source/active_support_core_extensions.textile
diff options
context:
space:
mode:
authorVijay Dev <vijaydev.cse@gmail.com>2011-11-30 23:32:01 +0530
committerVijay Dev <vijaydev.cse@gmail.com>2011-11-30 23:32:01 +0530
commit88daf082581bcec5fcdbb92d1fd784188e4d99bd (patch)
tree4b219e66b9ee5d6830adebfaedc0d65a3edc9741 /railties/guides/source/active_support_core_extensions.textile
parent5b2eb64ceb08cd005dc06b721935de5853971473 (diff)
parente3bc1385f1e8d2816deb215880d99aca136c0cc3 (diff)
downloadrails-88daf082581bcec5fcdbb92d1fd784188e4d99bd.tar.gz
rails-88daf082581bcec5fcdbb92d1fd784188e4d99bd.tar.bz2
rails-88daf082581bcec5fcdbb92d1fd784188e4d99bd.zip
Merge branch 'master' of github.com:lifo/docrails
Diffstat (limited to 'railties/guides/source/active_support_core_extensions.textile')
-rw-r--r--railties/guides/source/active_support_core_extensions.textile4
1 files changed, 3 insertions, 1 deletions
diff --git a/railties/guides/source/active_support_core_extensions.textile b/railties/guides/source/active_support_core_extensions.textile
index 2dee440b3b..7959a88c5b 100644
--- a/railties/guides/source/active_support_core_extensions.textile
+++ b/railties/guides/source/active_support_core_extensions.textile
@@ -440,14 +440,16 @@ NOTE: Defined in +active_support/core_ext/kernel/reporting.rb+.
h4. +in?+
-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?+.
+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?+.
Examples of +in?+:
<ruby>
+1.in?(1,2) # => true
1.in?([1,2]) # => true
"lo".in?("hello") # => true
25.in?(30..50) # => false
+1.in?(1) # => ArgumentError
</ruby>
NOTE: Defined in +active_support/core_ext/object/inclusion.rb+.