Skip to content

Commit

Permalink
Fix "instance variable @identity_map_class not initialized" warning
Browse files Browse the repository at this point in the history
  • Loading branch information
sferik committed Sep 7, 2012
1 parent c5efc1b commit 74a6a9d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/twitter/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ def self.attr_reader(*attrs)
# return [Twitter::IdentityMap]
def self.identity_map
return unless Twitter.identity_map
@identity_map = Twitter.identity_map.new if @identity_map_class != Twitter.identity_map
@identity_map_class = Twitter.identity_map
@identity_map = Twitter.identity_map.new unless defined?(@identity_map) && @identity_map.class == Twitter.identity_map
@identity_map
end

Expand Down

0 comments on commit 74a6a9d

Please sign in to comment.