Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

added an exception to Object#in? to match the methods documentation

  • Loading branch information...
commit 2db9f8a41c0e9d8978c0f6b80cb6efe5665168a7 1 parent 89884c1
@jaredonline jaredonline authored dhh committed
Showing with 1 addition and 0 deletions.
  1. +1 −0  activesupport/lib/active_support/core_ext/object/inclusion.rb
View
1  activesupport/lib/active_support/core_ext/object/inclusion.rb
@@ -6,6 +6,7 @@ class Object
# "Konata".in?(characters) # => true
#
def in?(another_object)
+ raise ArgumentError.new("You must supply another object that responds to include?") unless another_object.respond_to?(:include?)
another_object.include?(self)
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.