Undefined to_hash for Array in Response Wrapper
Merovex opened this issue · comments
Ben W commented
/ruby-2.3.1/gems/github_api-0.14.5/lib/github_api/response_wrapper.rb:97:in to_hash': undefined method
to_hash' for []:Array (NoMethodError)
Perhaps catch this error and provide a more helpful response? :)
require 'awesome_print'
require 'github'
issues = Github::Client::Issues.new user: 'piotrmurach', repo: 'github'
ap issues
ap issues.milestones.list state: 'open'
Shweta Kale commented
@Merovex It seems to error is coming from awsome_print
.
When I don't include awesome_print
I am getting expected result.
2.3.1 :008 > p issues.milestones.list state: 'open'
#<Github::ResponseWrapper @body="[]">
=> #<Github::ResponseWrapper @body="[]">
But, when I include awesome_print
I get error you mentioned so I think you should check in awesome_print
gem instead of this.