-
-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[🚀 Feature]: Ruby 3.4 support #14934
Comments
@voxik, thank you for creating this issue. We will troubleshoot it as soon as we can. Info for maintainersTriage this issue by using labels.
If information is missing, add a helpful comment and then
If the issue is a question, add the
If the issue is valid but there is no time to troubleshoot it, consider adding the
If the issue requires changes or fixes from an external project (e.g., ChromeDriver, GeckoDriver, MSEdgeDriver, W3C),
add the applicable
After troubleshooting the issue, please add the Thank you! |
This would be the patch: From 197157e98ce42550eed6a3c387eb89a0e99cfa3e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <[email protected]>
Date: Mon, 23 Dec 2024 16:55:02 +0100
Subject: [PATCH] Fix `Hash#inspect` formatting for Ruby 3.4 compatibility
https://bugs.ruby-lang.org/issues/20433
Fixes #14934
---
.../unit/selenium/webdriver/chrome/options_spec.rb | 2 +-
.../unit/selenium/webdriver/edge/options_spec.rb | 2 +-
rb/spec/unit/selenium/webdriver/guard_spec.rb | 14 +++++++-------
3 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/rb/spec/unit/selenium/webdriver/chrome/options_spec.rb b/rb/spec/unit/selenium/webdriver/chrome/options_spec.rb
index a87f073e50..8eb6ebe042 100644
--- a/rb/spec/unit/selenium/webdriver/chrome/options_spec.rb
+++ b/rb/spec/unit/selenium/webdriver/chrome/options_spec.rb
@@ -247,7 +247,7 @@ module Selenium
expect {
options.as_json
- }.to raise_error(Error::WebDriverError, 'These options are not w3c compliant: {:foo=>"bar"}')
+ }.to raise_error(Error::WebDriverError, %|These options are not w3c compliant: #{{:foo=>"bar"}}|)
end
it 'returns added options' do
diff --git a/rb/spec/unit/selenium/webdriver/edge/options_spec.rb b/rb/spec/unit/selenium/webdriver/edge/options_spec.rb
index eccaeadf6e..1bced2acaf 100644
--- a/rb/spec/unit/selenium/webdriver/edge/options_spec.rb
+++ b/rb/spec/unit/selenium/webdriver/edge/options_spec.rb
@@ -209,7 +209,7 @@ module Selenium
expect {
options.as_json
- }.to raise_error(Error::WebDriverError, 'These options are not w3c compliant: {:foo=>"bar"}')
+ }.to raise_error(Error::WebDriverError, %|These options are not w3c compliant: #{{:foo=>"bar"}}|)
end
it 'returns added options' do
diff --git a/rb/spec/unit/selenium/webdriver/guard_spec.rb b/rb/spec/unit/selenium/webdriver/guard_spec.rb
index 60a17ac67e..5c45311389 100644
--- a/rb/spec/unit/selenium/webdriver/guard_spec.rb
+++ b/rb/spec/unit/selenium/webdriver/guard_spec.rb
@@ -78,14 +78,14 @@ module Selenium
guards.add_condition(:foo, false)
expect(guards.disposition).to eq [:pending,
- 'Test guarded; Guarded by {:foo=>false, :reason=>"No reason given"};']
+ %|Test guarded; Guarded by #{{:foo=>false, :reason=>"No reason given"}};|]
end
it 'is skipped without provided reason', exclusive: {foo: true} do |example|
guards = described_class.new(example)
guards.add_condition(:foo, false)
- message = 'Test does not apply to this configuration; Guarded by {:foo=>true, :reason=>"No reason given"};'
+ message = %|Test does not apply to this configuration; Guarded by #{{:foo=>true, :reason=>"No reason given"}};|
expect(guards.disposition).to eq [:skip, message]
end
end
@@ -158,7 +158,7 @@ module Selenium
it 'defaults to no reason given' do
guard = described_class.new({}, :only)
- expect(guard.message).to eq('Test guarded; Guarded by {:reason=>"No reason given"};')
+ expect(guard.message).to eq(%|Test guarded; Guarded by #{{:reason=>"No reason given"}};|)
end
it 'accepts integer' do |example|
@@ -171,7 +171,7 @@ module Selenium
it 'accepts String' do
guard = described_class.new({reason: 'because'}, :only)
- expect(guard.message).to eq('Test guarded; Guarded by {:reason=>"because"};')
+ expect(guard.message).to eq(%|Test guarded; Guarded by #{{:reason=>"because"}};|)
end
it 'accepts Symbol of known message' do
@@ -191,20 +191,20 @@ module Selenium
it 'has special message for exclude' do
guard = described_class.new({reason: 'because'}, :exclude)
- expect(guard.message).to eq('Test skipped because it breaks test run; Guarded by {:reason=>"because"};')
+ expect(guard.message).to eq(%|Test skipped because it breaks test run; Guarded by #{{:reason=>"because"}};|)
end
it 'has special message for flaky' do
guard = described_class.new({reason: 'because'}, :flaky)
- msg = 'Test skipped because it is unreliable in this configuration; Guarded by {:reason=>"because"};'
+ msg = %|Test skipped because it is unreliable in this configuration; Guarded by #{{:reason=>"because"}};|
expect(guard.message).to eq(msg)
end
it 'has special message for exclusive' do
guard = described_class.new({reason: 'because'}, :exclusive)
- expect(guard.message).to eq('Test does not apply to this configuration; Guarded by {:reason=>"because"};')
+ expect(guard.message).to eq(%|Test does not apply to this configuration; Guarded by #{{:reason=>"because"}};|)
end
end
end |
This week I will be wrapping up #14900 and afterward, I will go back to the 3.2.2 upgrade, we need to do a procedural upgrade also to validate that all the tests and dependencies work as expected, so hopefully after successfully upgrading to 3.2.2 we can work towards 3.4.0 :) |
Feature and motivation
Is there Ruby 3.4 support planned any time soon? The official release should be out in just two days
Usage example
Observing test failures such as:
These seems to be caused by
Hash#inspect
formatting change:https://bugs.ruby-lang.org/issues/20433
I'd contributed the fixes, but I can't sign the CLA 🤷
The text was updated successfully, but these errors were encountered: