I found it unexpected that optional parameter hashes are being modified, and keys are deleted. The specific example that was tripping me up was in Links::links.
I noticed that the first set of results that were returned were from the correct ':category', and the rest were from the default.
p q_opts = {:limit=>100,:category=>:new}
#> {:limit=>100, :category=>:new}
client.links(subreddit,q_opts)
p q_opts
#>{:limit=>100}
I worked around it by cloning the hash each time I use it.
I found it unexpected that optional parameter hashes are being modified, and keys are deleted. The specific example that was tripping me up was in Links::links. I noticed that the first set of results that were returned were from the correct ':category', and the rest were from the default.
I worked around it by cloning the hash each time I use it.