Skip to content

Use method_defined? instead of responds_to? #282

Merged
merged 1 commit into from Jul 7, 2012
+1 −1
View
2 lib/twitter/core_ext/string.rb
@@ -5,6 +5,6 @@ class String
# @return [String]
def camelize
self.gsub(/\/(.?)/){"::#{$1.upcase}"}.gsub(/(?:^|_)(.)/){$1.upcase}
- end unless respond_to?(:camelize)
+ end unless method_defined?(:camelize)
end
Something went wrong with that request. Please try again.