ruby_open_weather_map icon indicating copy to clipboard operation
ruby_open_weather_map copied to clipboard

merge! leaving options dirty

Open sudoaza opened this issue 8 years ago • 2 comments

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

sudoaza avatar Aug 30 '17 18:08 sudoaza

@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.

coderhs avatar Nov 05 '17 17:11 coderhs

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

sudoaza avatar Nov 05 '17 21:11 sudoaza