Permalink
Browse files

Only send if method takes no arguments (even default arguments)

  • Loading branch information...
1 parent b3d9007 commit c7fcd572a9b94994b7d0ff015efab951a9eb45f4 @sferik committed Mar 14, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/twitter/base.rb
View
@@ -97,7 +97,7 @@ def attrs
if value.respond_to?(:attrs)
attrs.merge!(key => value.attrs)
else
- attrs.merge!(key => respond_to?(key) ? send(key) : value)
+ attrs.merge!(key => respond_to?(key) && method(key).arity.zero? ? send(key) : value)
end
end
end

0 comments on commit c7fcd57

Please sign in to comment.