-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hyperclient::Resource#to_h != Hyperclient::Resource#to_hash #103
Comments
Interesting, probably just a bug, feel free to write a spec/PR a fix. |
Ok, a bit of poking and I've discovered it. Array#to_h exists hyperclient/lib/hyperclient/resource.rb Line 87 in 39a07cb
Given that Hyperclient::Resource#to_hash has no arguments passed, we don't actually get to do anything with the to_h method on the Hyperclient::Resource, and there's nothing returned, hence "nil" is the result. Dumb question, why is the !Array.method_defined?(method) used there? If I change it to a simple "else" all tests still pass. |
Honestly I don't remember the reason for that |
Are you running |
rake spinache output:
This continues all the way through. |
Hi guys, I'm using v0.8.1 and am having a discrepancy when using #to_h in place of #to_hash on a Hyperclient::Resource.
However the call to #to_h returns nil, while the call to #to_hash returns the expected hash
The text was updated successfully, but these errors were encountered: