Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Ruby 1.9 compatibility

  • Loading branch information...
commit 08db32f8bc9f7d9235de1defd001b92eed643f07 1 parent 3db9072
@RISCfuture RISCfuture authored
Showing with 4 additions and 8 deletions.
  1. +4 −8 lib/dropbox/api.rb
View
12 lib/dropbox/api.rb
@@ -448,17 +448,15 @@ def initialize(request, response) # :nodoc:
@response = response
end
- def message # :nodoc:
+ def to_s # :nodoc:
"API error: #{request}"
end
- alias :to_s :message
- alias :to_str :message
end
# Raised when the Dropbox API returns a response that was not understood.
class ParseError < APIError
- def message # :nodoc:
+ def to_s # :nodoc:
"Invalid response received: #{request}"
end
end
@@ -466,7 +464,7 @@ def message # :nodoc:
# Raised when something other than 200 OK is returned by an API method.
class UnsuccessfulResponseError < APIError
- def message # :nodoc:
+ def to_s # :nodoc:
"HTTP status #{@response.class.to_s} received: #{request}"
end
end
@@ -481,11 +479,9 @@ def initialize(path) # :nodoc:
@path = path
end
- def message # :nodoc:
+ def to_s # :nodoc:
"#{self.class.to_s}: #{@path}"
end
- alias :to_s :message
- alias :to_str :message
end
# Raised when a Dropbox file doesn't exist.
Please sign in to comment.
Something went wrong with that request. Please try again.