diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2012-04-28 20:18:26 -0700 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2012-04-28 20:18:26 -0700 |
commit | 1a4e27ff96b3b7add1a4a43ca757ea8ee6c05c00 (patch) | |
tree | 03e64efa0e3a307c0f8f58eadc31fc01e26b1cd7 /activesupport/lib/active_support/core_ext/object/inclusion.rb | |
parent | ad2c5ea2786817592014fae09934398173c1a7f9 (diff) | |
parent | 432a65fab2a6c7eb6ff77062e73f7627470f7da7 (diff) | |
download | rails-1a4e27ff96b3b7add1a4a43ca757ea8ee6c05c00.tar.gz rails-1a4e27ff96b3b7add1a4a43ca757ea8ee6c05c00.tar.bz2 rails-1a4e27ff96b3b7add1a4a43ca757ea8ee6c05c00.zip |
Merge pull request #5996 from gazay/remove_excess_selfs
Active Support housekeeping and polish
Diffstat (limited to 'activesupport/lib/active_support/core_ext/object/inclusion.rb')
-rw-r--r-- | activesupport/lib/active_support/core_ext/object/inclusion.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/activesupport/lib/active_support/core_ext/object/inclusion.rb b/activesupport/lib/active_support/core_ext/object/inclusion.rb index f611cdd606..3fec465ec0 100644 --- a/activesupport/lib/active_support/core_ext/object/inclusion.rb +++ b/activesupport/lib/active_support/core_ext/object/inclusion.rb @@ -2,11 +2,11 @@ class Object # Returns true if this object is included in the argument(s). Argument must be # any object which responds to +#include?+ or optionally, multiple arguments can be passed in. Usage: # - # characters = ["Konata", "Kagami", "Tsukasa"] - # "Konata".in?(characters) # => true - # - # character = "Konata" - # character.in?("Konata", "Kagami", "Tsukasa") # => true + # characters = ['Konata', 'Kagami', 'Tsukasa'] + # 'Konata'.in?(characters) # => true + # + # character = 'Konata' + # character.in?('Konata', 'Kagami', 'Tsukasa') # => true # # This will throw an ArgumentError if a single argument is passed in and it doesn't respond # to +#include?+. @@ -18,7 +18,7 @@ class Object if another_object.respond_to? :include? another_object.include? self else - raise ArgumentError.new("The single parameter passed to #in? must respond to #include?") + raise ArgumentError.new 'The single parameter passed to #in? must respond to #include?' end end end |