diff --git a/lib/twitter.rb b/lib/twitter.rb index 8bb243098..169bbe8b8 100644 --- a/lib/twitter.rb +++ b/lib/twitter.rb @@ -16,15 +16,14 @@ def client end end - def respond_to?(method, include_private=false) - self.client.respond_to?(method, include_private) || super - end + def respond_to_missing?(method_name, include_private=false); client.respond_to?(method_name, include_private); end if RUBY_VERSION >= "1.9" + def respond_to?(method_name, include_private=false); client.respond_to?(method_name, include_private) || super; end if RUBY_VERSION < "1.9" private - def method_missing(method, *args, &block) - return super unless self.client.respond_to?(method) - self.client.send(method, *args, &block) + def method_missing(method_name, *args, &block) + return super unless client.respond_to?(method_name) + client.send(method_name, *args, &block) end end