There's a method in Any called contains?, and it's essentially a wrapper for the includes? method if the underlying value is an Array or String. Replacing it with a method called includes? would make this far more consistent with the core library.
It also returns a false value if the underlying object isn't an Array or String. Is this the best behaviour, or should it raise an exception in this situation?
There's a method in
Anycalledcontains?, and it's essentially a wrapper for theincludes?method if the underlying value is anArrayorString. Replacing it with a method calledincludes?would make this far more consistent with the core library.It also returns a
falsevalue if the underlying object isn't anArrayorString.Is this the best behaviour, or should it raise an exception in this situation?