sferik/twitter — pull request #282 by aamerabbas (2012-07-07 08:04:14+00:00)
Title: Use method_defined? instead of responds_to?

The string extension for "camelize" checks if this method has already been defined by called responds_to?. This, however, doesn't work because it's being called on the String class rather than an instance of the String class (and hence, will always return false).

This means that if String#camelize is already defined, it will always be overridden. One notable situation where this breaks things is when you call something like 'some_string'.camelize(:lower) since the ActiveSupport version of camelize can accept an optional argument whereas the one defined in the Twitter gem cannot.