Skip to content

Commit

Permalink
Only send if method takes no arguments (even default arguments)
Browse files Browse the repository at this point in the history
  • Loading branch information
sferik committed Mar 14, 2013
1 parent b3d9007 commit c7fcd57
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/twitter/base.rb
Expand Up @@ -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
Expand Down

0 comments on commit c7fcd57

Please sign in to comment.