serpapi / google-search-results-ruby

Google Search Results via SERP API Ruby Gem
https://serpapi.com
MIT License
55 stars 9 forks source link

Make `URI#open` cross versions compatible #8

Closed hartator closed 3 years ago

hartator commented 3 years ago

Internal issue: https://github.com/hartator/SerpApi/issues/1452

We found a way to make open and URI::open across all Ruby versions! 🎉

image

image

URI.open and open both are version specific. URI(url).open(read_timeout: 600).read should work across versions. Ref: https://bugs.ruby-lang.org/issues/15893

@jvmvik Can you merge this PR and push a new gem version for it?