Skip to content

Commit

Permalink
Fix "instance variable @client not initialized" warning
Browse files Browse the repository at this point in the history
  • Loading branch information
sferik committed Sep 7, 2012
1 parent b856ef0 commit fc3a006
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions lib/twitter.rb
Expand Up @@ -9,11 +9,8 @@ class << self
#
# @return [Twitter::Client]
def client
if @client && @client.cache_key == options.hash
@client
else
@client = Twitter::Client.new(options)
end
@client = Twitter::Client.new(options) unless defined?(@client) && @client.cache_key == options.hash
@client
end

def respond_to_missing?(method_name, include_private=false); client.respond_to?(method_name, include_private); end if RUBY_VERSION >= "1.9"
Expand Down

0 comments on commit fc3a006

Please sign in to comment.