8000 Change CGI::Cookie.new to Cookie.new by jeremyevans · Pull Request #2335 · rack/rack · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Change CGI::Cookie.new to Cookie.new #2335

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

Open
wants to merge 2 commits into
base: 2-2-stable
Choose a base branch
from

Conversation

jeremyevans
Copy link
8000 Contributor

Fixes #2334

@yahonda
Copy link
yahonda commented May 20, 2025

Confirmd that this pull request addresses the Rails CI errors NameError: uninitialized constant CGI::Cookie.

https://buildkite.com/rails/rails-nightly/builds/2248#0196ea59-3eab-4a37-bc05-24126a9ad23d/1181-2640

While I see these 3 tests are failing with Ruby 3.5.0dev.

$ ruby -v
ruby 3.5.0dev (2025-05-19T17:34:29Z master a7ef9a44a6) +PRISM [x86_64-linux]
$ bundle exec ruby -Itest test/spec_mock.rb
Run options: --seed 35143

# Running:

...........................F.....FF

Finished in 0.023080s, 1516.4772 runs/s, 6932.4670 assertions/s.

  1) Failure:
Rack::MockResponse#test_0005_provide access to persistent cookies [test/spec_mock.rb:306]:
--- expected
+++ actual
@@ -1 +1,3 @@
-"persistent_test"
+# encoding: ASCII-8BIT
+#    valid: true
+"p"


  2) Failure:
Rack::MockResponse#test_0004_provide access to session cookies [test/spec_mock.rb:295]:
--- expected
+++ actual
@@ -1 +1,3 @@
-"session_test"
+# encoding: ASCII-8BIT
+#    valid: true
+"s"


  3) Failure:
Rack::MockResponse#test_0006_provide access to secure cookies [test/spec_mock.rb:317]:
--- expected
+++ actual
@@ -1 +1,3 @@
-"secure_test"
+# encoding: ASCII-8BIT
+#    valid: true
+"s"


35 runs, 160 assertions, 3 failures, 0 errors, 0 skips
$

This was also missed in the 2.2-stable backport.
@jeremyevans
Copy link
Contributor Author

Found something else that was missed in the 2.2 backport, and pushed a commit for it. @yahonda, I apologize, but could you please check again and see if the additional commit fixed it?

@yahonda
Copy link
yahonda commented May 20, 2025

Confirmed 12195e9 addresses all of failures reported at #2335 (comment)

@jeremyevans
Copy link
Contributor Author

@yahonda Thank you very much for your quick testing of this PR.

@ioquatix It looks like these two changes were missed in the backport. I recommend merging this and releasing 2.2.16 with the changes.

@Earlopain
Copy link
Contributor

3-0-stable is also incomplete. It produces the same failures as in #2335 (comment) and needs 12195e9

It also still uses OpenStruct, so there are other failures on 3.5 since it is now gone for good. The same is also true for 2-2-stable. Should that be handled? For reference: #2004 #2166. It's not a problem for rails tests since some other dep pulls it in.

@ioquatix
Copy link
Member

Sorry folks it sounds like I did a poor job back-porting this fix. Let me take a closer look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
0