Skip to content
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

merge! leaving options dirty #37

Open
sudoaza opened this issue Aug 30, 2017 · 2 comments
Open

merge! leaving options dirty #37

sudoaza opened this issue Aug 30, 2017 · 2 comments

Comments

@sudoaza
Copy link

sudoaza commented Aug 30, 2017

merge! usage in find.rb seem to be leaving the options with the request parameters, affecting subsequent api calls

sudoaza pushed a commit to sudoaza/ruby_open_weather_map that referenced this issue Sep 4, 2017
@coderhs
Copy link
Owner

coderhs commented Nov 5, 2017

@sudoaza sorry about not following up on the issue. Can you give me an example of the request. Would be useful for future reference and i will merge it along with the example in the comment so that we can know why we changed it.

i believe we used ! to save memory else we might be making a lot of object based on the volume of request you application send.

@sudoaza
Copy link
Author

sudoaza commented Nov 5, 2017

consider this code

options = {}
OpenWeather::Find.accurate(query, options)
# now options has {q: query, type: 'accurate'}

next call with the same options variable would return nothing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants