Skip to content
This repository has been archived by the owner on Oct 20, 2020. It is now read-only.

Commit

Permalink
ensure err.response.body always works
Browse files Browse the repository at this point in the history
  • Loading branch information
mislav committed May 2, 2012
1 parent 1ff1f46 commit 229d4ae
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions instagram.rb
Expand Up @@ -93,6 +93,7 @@ def get(path, params = nil)
raise Error.new(response) if response.status >= 500
body = raw ? response.env[:raw_body] : response.body
body.singleton_class.class_eval <<-RUBY
def body() self end
def status() #{response.status} end
def error!() raise Instagram::Error.new(self) end
RUBY
Expand Down

0 comments on commit 229d4ae

Please sign in to comment.