Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

caching Twitter.screen_name makes Twitter::Client.new.user return old user #137

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
2 participants

Before Patch:
irb(main):001:0> at1 = AccessToken.find(3)
=> #<AccessToken id: 3, secret: "p4EOngHwWi4MsCSy92MgfvV8wgNoyVVTCgLAylKWmas", token: "236155797-kWLr6T5MZdPGmTX2hnQEKHMQEn72tNUlxOyuFDRc", user_id: 7, token_type: "twitter", created_at: "2011-01-09 23:09:24", updated_at: "2011-01-09 23:09:24">
irb(main):002:0> at2 = AccessToken.find(5)
=> #<AccessToken id: 5, secret: "1XZy36MSF1TVlycNHwOhU6hLKCiTKBSQgYZ6yunB0", token: "44006917-TEcF5y8Bj4sWls1Bt8mN3lFISbjK6COJmwIPZnutY", user_id: 10, token_type: "twitter", created_at: "2011-01-16 15:24:16", updated_at: "2011-01-16 15:24:16">
irb(main):003:0> Twitter::Client.new(:oauth_token => at1.token, :oauth_token_secret => at1.secret).user.screen_name
=> "bostontoastm"
irb(main):004:0> Twitter::Client.new(:oauth_token => at2.token, :oauth_token_secret => at2.secret).user.screen_name
=> "bostontoastm"

After Patch:

irb(main):001:0> at1 = AccessToken.find(3)
=> #<AccessToken id: 3, secret: "p4EOngHwWi4MsCSy92MgfvV8wgNoyVVTCgLAylKWmas", token: "236155797-kWLr6T5MZdPGmTX2hnQEKHMQEn72tNUlxOyuFDRc", user_id: 7, token_type: "twitter", created_at: "2011-01-09 23:09:24", updated_at: "2011-01-09 23:09:24">
irb(main):002:0> at2 = AccessToken.find(5)
=> #<AccessToken id: 5, secret: "1XZy36MSF1TVlycNHwOhU6hLKCiTKBSQgYZ6yunB0", token: "44006917-TEcF5y8Bj4sWls1Bt8mN3lFISbjK6COJmwIPZnutY", user_id: 10, token_type: "twitter", created_at: "2011-01-16 15:24:16", updated_at: "2011-01-16 15:24:16">
irb(main):003:0> Twitter::Client.new(:oauth_token => at1.token, :oauth_token_secret => at1.secret).user.screen_name
=> "bostontoastm"
irb(main):004:0> Twitter::Client.new(:oauth_token => at2.token, :oauth_token_secret => at2.secret).user.screen_name
=> "KenMazaika"

this is a dupe

In the future, please don't include version bumps in your pulls requests.

This issue was closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment