Skip to content

Commit 00c9f86

Browse files
committed
simplify regex
1 parent b6021bf commit 00c9f86

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

rb/spec/integration/selenium/webdriver/spec_support/test_environment.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,11 +197,12 @@ def beta_chrome_version
197197
chrome_beta_url = 'https://chromereleases.googleblog.com/search/label/Beta%20updates'
198198

199199
uri = URI.parse(chrome_beta_url)
200+
200201
response = Net::HTTP.get_response(uri)
201202

202203
return "Failed to fetch Chrome Beta page: #{response&.code}" unless response.is_a?(Net::HTTPSuccess)
203204

204-
response.body.match(/Chrome Beta\s+\d+\s+\((\d+\.\d+\.\d+\.\d+)\)/)[1]
205+
response.body.match(/\d+\.\d+\.\d+\.\d+/).to_s
205206
end
206207

207208
private

0 commit comments

Comments
 (0)