Skip to content

Commit

Permalink
Prefer $ERROR_INFO from the English library over $!
Browse files Browse the repository at this point in the history
  • Loading branch information
sferik committed Dec 9, 2013
1 parent 5fb8c33 commit 1e878dd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/twitter/error.rb
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def extract_message_from_errors(body)
# @param response_headers [Hash]
# @param code [Integer]
# @return [Twitter::Error]
def initialize(exception = $!, response_headers = {}, code = nil)
def initialize(exception = $ERROR_INFO, response_headers = {}, code = nil)
@rate_limit = RateLimit.new(response_headers)
@wrapped_exception = exception
@code = code
Expand Down

0 comments on commit 1e878dd

Please sign in to comment.