rubymotion-community / motion-support

Commonly useful extensions to the standard library for RubyMotion
MIT License
132 stars 28 forks source link

Fix docs for `Object#in?`. #9

Closed BMorearty closed 11 years ago

BMorearty commented 11 years ago

The comment said that you can optionally pass multiple arguments. The code doesn't allow this, so I fixed the comment.

To be clear, in case there is pushback: the code was correct and the comment was wrong. Object#in? should definitely not allow multiple arguments, because that would make its contract ambiguous. And an ambiguous contract is worse than useless. People who call it will get unpredictable behavior.

See related discussions in ActiveSupport, going back to when I first added Object#in? to Rails:

tkadauke commented 11 years ago

Thanks for that :-)