[ruby-core:112218] [Ruby master Bug#19414] uninitialized constant URI::WSS in 3.0.X and 3.1.X

Issue #19414 has been reported by noraj (Alexandre ZANNI). ---------------------------------------- Bug #19414: uninitialized constant URI::WSS in 3.0.X and 3.1.X https://bugs.ruby-lang.org/issues/19414 * Author: noraj (Alexandre ZANNI) * Status: Open * Priority: Normal * ruby -v: 3.1.3 * Backport: 2.7: UNKNOWN, 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: UNKNOWN ---------------------------------------- I have a library called [ctf-party](https://github.com/noraj/ctf-party), [making use of URI:WSS](https://github.com/noraj/ctf-party/blob/ef3b82cc1668325b782246a9bb162b18a9b2...), and it's making my [CI pipeline fails](https://github.com/noraj/ctf-party/actions/runs/4059895670). I'm able to reproduce it locally (`bundle exec rake test`), working with ruby 3.2.0 and not with 3.1.3. The error is: ``` irb(main):001:0> require 'uri' => true irb(main):002:0> URI::WS => URI::WS irb(main):003:0> URI::WSS (irb):3:in `<main>': uninitialized constant URI::WSS (NameError) from /home/noraj/.asdf/installs/ruby/3.1.3/lib/ruby/gems/3.1.0/gems/irb-1.4.1/exe/irb:11:in `<top (required)>' from /home/noraj/.asdf/installs/ruby/3.1.3/bin/irb:25:in `load' from /home/noraj/.asdf/installs/ruby/3.1.3/bin/irb:25:in `<main>' ``` I don't understand why is that happening since [it exists in the official documentation](https://ruby-doc.org/3.1.3/stdlibs/uri/URI/WSS.html) and the [code looks ok to me on tag 3.1.3](https://github.com/ruby/ruby/blob/v3_1_3/lib/uri/wss.rb) which is [strictly identical to the code on tag 3.2.0](https://github.com/ruby/ruby/blob/v3_2_0/lib/uri/wss.rb). It works if I require the file explicitly: ``` irb(main):004:0> require 'uri/wss' => true irb(main):005:0> URI::WSS => URI::WSS ``` The issue come from the fact that [in 3.2.0 `'uri/wss'` is required](https://github.com/ruby/ruby/blob/v3_2_0/lib/uri.rb#L104) but [not in 3.1.3](https://github.com/ruby/ruby/blob/v3_1_3/lib/uri.rb#L103). In [3.0.5](https://github.com/ruby/ruby/blob/v3_0_5/lib/uri.rb) it is even worse as neither ws and wss are required. -- https://bugs.ruby-lang.org/

Issue #19414 has been updated by jeremyevans0 (Jeremy Evans). Status changed from Open to Closed Backport changed from 2.7: UNKNOWN, 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: UNKNOWN to 2.7: UNKNOWN, 3.0: REQUIRED, 3.1: REQUIRED, 3.2: DONTNEED Since this is fixed in the master branch and Ruby 3.2, this is a backport request for 3.1 and 3.0. For 3.1, it needs commit:c94f964e3f94e9f934a3f4e73fb55f5fd2a21f08 For 3.0, it needs commit:c94f964e3f94e9f934a3f4e73fb55f5fd2a21f08 and commit:b875a85c5367b9dff96e1ca1e78a2e35580a2f80 ---------------------------------------- Bug #19414: uninitialized constant URI::WSS in 3.0.X and 3.1.X https://bugs.ruby-lang.org/issues/19414#change-101645 * Author: noraj (Alexandre ZANNI) * Status: Closed * Priority: Normal * ruby -v: 3.1.3 * Backport: 2.7: UNKNOWN, 3.0: REQUIRED, 3.1: REQUIRED, 3.2: DONTNEED ---------------------------------------- I have a library called [ctf-party](https://github.com/noraj/ctf-party), [making use of URI:WSS](https://github.com/noraj/ctf-party/blob/ef3b82cc1668325b782246a9bb162b18a9b2...), and it's making my [CI pipeline fails](https://github.com/noraj/ctf-party/actions/runs/4059895670). I'm able to reproduce it locally (`bundle exec rake test`), working with ruby 3.2.0 and not with 3.1.3. The error is: ``` irb(main):001:0> require 'uri' => true irb(main):002:0> URI::WS => URI::WS irb(main):003:0> URI::WSS (irb):3:in `<main>': uninitialized constant URI::WSS (NameError) from /home/noraj/.asdf/installs/ruby/3.1.3/lib/ruby/gems/3.1.0/gems/irb-1.4.1/exe/irb:11:in `<top (required)>' from /home/noraj/.asdf/installs/ruby/3.1.3/bin/irb:25:in `load' from /home/noraj/.asdf/installs/ruby/3.1.3/bin/irb:25:in `<main>' ``` I don't understand why is that happening since [it exists in the official documentation](https://ruby-doc.org/3.1.3/stdlibs/uri/URI/WSS.html) and the [code looks ok to me on tag 3.1.3](https://github.com/ruby/ruby/blob/v3_1_3/lib/uri/wss.rb) which is [strictly identical to the code on tag 3.2.0](https://github.com/ruby/ruby/blob/v3_2_0/lib/uri/wss.rb). It works if I require the file explicitly: ``` irb(main):004:0> require 'uri/wss' => true irb(main):005:0> URI::WSS => URI::WSS ``` The issue come from the fact that [in 3.2.0 `'uri/wss'` is required](https://github.com/ruby/ruby/blob/v3_2_0/lib/uri.rb#L104) but [not in 3.1.3](https://github.com/ruby/ruby/blob/v3_1_3/lib/uri.rb#L103). In [3.0.5](https://github.com/ruby/ruby/blob/v3_0_5/lib/uri.rb) it is even worse as neither ws and wss are required. -- https://bugs.ruby-lang.org/

Issue #19414 has been updated by noraj (Alexandre ZANNI). jeremyevans0 (Jeremy Evans) wrote in #note-1:
Since this is fixed in the master branch and Ruby 3.2, this is a backport request for 3.1 and 3.0.
For 3.1, it needs commit:c94f964e3f94e9f934a3f4e73fb55f5fd2a21f08
For 3.0, it needs commit:c94f964e3f94e9f934a3f4e73fb55f5fd2a21f08 and commit:b875a85c5367b9dff96e1ca1e78a2e35580a2f80
Do I have something to do? Thanks to the Backport field this issue is listed in [Backport 3.1](https://bugs.ruby-lang.org/projects/ruby-master/issues?query_id=287) and [Backport 3.0](https://bugs.ruby-lang.org/projects/ruby-master/issues?query_id=249) but has status closed. However, I don't see the backport committed on [ruby_3_0](https://git.ruby-lang.org/ruby.git/log/?h=ruby_3_0) or [ruby_3_1](https://git.ruby-lang.org/ruby.git/log/?h=ruby_3_1). ---------------------------------------- Bug #19414: uninitialized constant URI::WSS in 3.0.X and 3.1.X https://bugs.ruby-lang.org/issues/19414#change-101649 * Author: noraj (Alexandre ZANNI) * Status: Closed * Priority: Normal * ruby -v: 3.1.3 * Backport: 2.7: UNKNOWN, 3.0: REQUIRED, 3.1: REQUIRED, 3.2: DONTNEED ---------------------------------------- I have a library called [ctf-party](https://github.com/noraj/ctf-party), [making use of URI:WSS](https://github.com/noraj/ctf-party/blob/ef3b82cc1668325b782246a9bb162b18a9b2...), and it's making my [CI pipeline fails](https://github.com/noraj/ctf-party/actions/runs/4059895670). I'm able to reproduce it locally (`bundle exec rake test`), working with ruby 3.2.0 and not with 3.1.3. The error is: ``` irb(main):001:0> require 'uri' => true irb(main):002:0> URI::WS => URI::WS irb(main):003:0> URI::WSS (irb):3:in `<main>': uninitialized constant URI::WSS (NameError) from /home/noraj/.asdf/installs/ruby/3.1.3/lib/ruby/gems/3.1.0/gems/irb-1.4.1/exe/irb:11:in `<top (required)>' from /home/noraj/.asdf/installs/ruby/3.1.3/bin/irb:25:in `load' from /home/noraj/.asdf/installs/ruby/3.1.3/bin/irb:25:in `<main>' ``` I don't understand why is that happening since [it exists in the official documentation](https://ruby-doc.org/3.1.3/stdlibs/uri/URI/WSS.html) and the [code looks ok to me on tag 3.1.3](https://github.com/ruby/ruby/blob/v3_1_3/lib/uri/wss.rb) which is [strictly identical to the code on tag 3.2.0](https://github.com/ruby/ruby/blob/v3_2_0/lib/uri/wss.rb). It works if I require the file explicitly: ``` irb(main):004:0> require 'uri/wss' => true irb(main):005:0> URI::WSS => URI::WSS ``` The issue come from the fact that [in 3.2.0 `'uri/wss'` is required](https://github.com/ruby/ruby/blob/v3_2_0/lib/uri.rb#L104) but [not in 3.1.3](https://github.com/ruby/ruby/blob/v3_1_3/lib/uri.rb#L103). In [3.0.5](https://github.com/ruby/ruby/blob/v3_0_5/lib/uri.rb) it is even worse as neither ws and wss are required. -- https://bugs.ruby-lang.org/

Issue #19414 has been updated by duerst (Martin Dürst). @noraj This is just how backporting works. Closed means closed on trunk; the backporting maintainers check what they need to do separately. ---------------------------------------- Bug #19414: uninitialized constant URI::WSS in 3.0.X and 3.1.X https://bugs.ruby-lang.org/issues/19414#change-101650 * Author: noraj (Alexandre ZANNI) * Status: Closed * Priority: Normal * ruby -v: 3.1.3 * Backport: 2.7: UNKNOWN, 3.0: REQUIRED, 3.1: REQUIRED, 3.2: DONTNEED ---------------------------------------- I have a library called [ctf-party](https://github.com/noraj/ctf-party), [making use of URI:WSS](https://github.com/noraj/ctf-party/blob/ef3b82cc1668325b782246a9bb162b18a9b2...), and it's making my [CI pipeline fails](https://github.com/noraj/ctf-party/actions/runs/4059895670). I'm able to reproduce it locally (`bundle exec rake test`), working with ruby 3.2.0 and not with 3.1.3. The error is: ``` irb(main):001:0> require 'uri' => true irb(main):002:0> URI::WS => URI::WS irb(main):003:0> URI::WSS (irb):3:in `<main>': uninitialized constant URI::WSS (NameError) from /home/noraj/.asdf/installs/ruby/3.1.3/lib/ruby/gems/3.1.0/gems/irb-1.4.1/exe/irb:11:in `<top (required)>' from /home/noraj/.asdf/installs/ruby/3.1.3/bin/irb:25:in `load' from /home/noraj/.asdf/installs/ruby/3.1.3/bin/irb:25:in `<main>' ``` I don't understand why is that happening since [it exists in the official documentation](https://ruby-doc.org/3.1.3/stdlibs/uri/URI/WSS.html) and the [code looks ok to me on tag 3.1.3](https://github.com/ruby/ruby/blob/v3_1_3/lib/uri/wss.rb) which is [strictly identical to the code on tag 3.2.0](https://github.com/ruby/ruby/blob/v3_2_0/lib/uri/wss.rb). It works if I require the file explicitly: ``` irb(main):004:0> require 'uri/wss' => true irb(main):005:0> URI::WSS => URI::WSS ``` The issue come from the fact that [in 3.2.0 `'uri/wss'` is required](https://github.com/ruby/ruby/blob/v3_2_0/lib/uri.rb#L104) but [not in 3.1.3](https://github.com/ruby/ruby/blob/v3_1_3/lib/uri.rb#L103). In [3.0.5](https://github.com/ruby/ruby/blob/v3_0_5/lib/uri.rb) it is even worse as neither ws and wss are required. -- https://bugs.ruby-lang.org/

Issue #19414 has been updated by noraj (Alexandre ZANNI). duerst (Martin Dürst) wrote in #note-3:
@noraj This is just how backporting works. Closed means closed on trunk; the backporting maintainers check what they need to do separately.
Ok, thank you and sorry for the naive question. I read [HowToBackport](https://bugs.ruby-lang.org/projects/ruby/wiki/HowToBackport) but was not sure what to do next. ---------------------------------------- Bug #19414: uninitialized constant URI::WSS in 3.0.X and 3.1.X https://bugs.ruby-lang.org/issues/19414#change-101658 * Author: noraj (Alexandre ZANNI) * Status: Closed * Priority: Normal * ruby -v: 3.1.3 * Backport: 2.7: UNKNOWN, 3.0: REQUIRED, 3.1: REQUIRED, 3.2: DONTNEED ---------------------------------------- I have a library called [ctf-party](https://github.com/noraj/ctf-party), [making use of URI:WSS](https://github.com/noraj/ctf-party/blob/ef3b82cc1668325b782246a9bb162b18a9b2...), and it's making my [CI pipeline fails](https://github.com/noraj/ctf-party/actions/runs/4059895670). I'm able to reproduce it locally (`bundle exec rake test`), working with ruby 3.2.0 and not with 3.1.3. The error is: ``` irb(main):001:0> require 'uri' => true irb(main):002:0> URI::WS => URI::WS irb(main):003:0> URI::WSS (irb):3:in `<main>': uninitialized constant URI::WSS (NameError) from /home/noraj/.asdf/installs/ruby/3.1.3/lib/ruby/gems/3.1.0/gems/irb-1.4.1/exe/irb:11:in `<top (required)>' from /home/noraj/.asdf/installs/ruby/3.1.3/bin/irb:25:in `load' from /home/noraj/.asdf/installs/ruby/3.1.3/bin/irb:25:in `<main>' ``` I don't understand why is that happening since [it exists in the official documentation](https://ruby-doc.org/3.1.3/stdlibs/uri/URI/WSS.html) and the [code looks ok to me on tag 3.1.3](https://github.com/ruby/ruby/blob/v3_1_3/lib/uri/wss.rb) which is [strictly identical to the code on tag 3.2.0](https://github.com/ruby/ruby/blob/v3_2_0/lib/uri/wss.rb). It works if I require the file explicitly: ``` irb(main):004:0> require 'uri/wss' => true irb(main):005:0> URI::WSS => URI::WSS ``` The issue come from the fact that [in 3.2.0 `'uri/wss'` is required](https://github.com/ruby/ruby/blob/v3_2_0/lib/uri.rb#L104) but [not in 3.1.3](https://github.com/ruby/ruby/blob/v3_1_3/lib/uri.rb#L103). In [3.0.5](https://github.com/ruby/ruby/blob/v3_0_5/lib/uri.rb) it is even worse as neither ws and wss are required. -- https://bugs.ruby-lang.org/

Issue #19414 has been updated by hsbt (Hiroshi SHIBATA). I submitted backport PRs: * Ruby 3.0: https://github.com/ruby/ruby/pull/7260 * Ruby 3.1: https://github.com/ruby/ruby/pull/7261 ---------------------------------------- Bug #19414: uninitialized constant URI::WSS in 3.0.X and 3.1.X https://bugs.ruby-lang.org/issues/19414#change-101689 * Author: noraj (Alexandre ZANNI) * Status: Closed * Priority: Normal * ruby -v: 3.1.3 * Backport: 2.7: UNKNOWN, 3.0: REQUIRED, 3.1: REQUIRED, 3.2: DONTNEED ---------------------------------------- I have a library called [ctf-party](https://github.com/noraj/ctf-party), [making use of URI:WSS](https://github.com/noraj/ctf-party/blob/ef3b82cc1668325b782246a9bb162b18a9b2...), and it's making my [CI pipeline fails](https://github.com/noraj/ctf-party/actions/runs/4059895670). I'm able to reproduce it locally (`bundle exec rake test`), working with ruby 3.2.0 and not with 3.1.3. The error is: ``` irb(main):001:0> require 'uri' => true irb(main):002:0> URI::WS => URI::WS irb(main):003:0> URI::WSS (irb):3:in `<main>': uninitialized constant URI::WSS (NameError) from /home/noraj/.asdf/installs/ruby/3.1.3/lib/ruby/gems/3.1.0/gems/irb-1.4.1/exe/irb:11:in `<top (required)>' from /home/noraj/.asdf/installs/ruby/3.1.3/bin/irb:25:in `load' from /home/noraj/.asdf/installs/ruby/3.1.3/bin/irb:25:in `<main>' ``` I don't understand why is that happening since [it exists in the official documentation](https://ruby-doc.org/3.1.3/stdlibs/uri/URI/WSS.html) and the [code looks ok to me on tag 3.1.3](https://github.com/ruby/ruby/blob/v3_1_3/lib/uri/wss.rb) which is [strictly identical to the code on tag 3.2.0](https://github.com/ruby/ruby/blob/v3_2_0/lib/uri/wss.rb). It works if I require the file explicitly: ``` irb(main):004:0> require 'uri/wss' => true irb(main):005:0> URI::WSS => URI::WSS ``` The issue come from the fact that [in 3.2.0 `'uri/wss'` is required](https://github.com/ruby/ruby/blob/v3_2_0/lib/uri.rb#L104) but [not in 3.1.3](https://github.com/ruby/ruby/blob/v3_1_3/lib/uri.rb#L103). In [3.0.5](https://github.com/ruby/ruby/blob/v3_0_5/lib/uri.rb) it is even worse as neither ws and wss are required. -- https://bugs.ruby-lang.org/

Issue #19414 has been updated by nagachika (Tomoyuki Chikanaga). Backport changed from 2.7: UNKNOWN, 3.0: REQUIRED, 3.1: REQUIRED, 3.2: DONTNEED to 2.7: UNKNOWN, 3.0: REQUIRED, 3.1: DONE, 3.2: DONTNEED Merged PR into ruby_3_1 at da27583cf364c0d69c085db4abf358c334a8eca1. ---------------------------------------- Bug #19414: uninitialized constant URI::WSS in 3.0.X and 3.1.X https://bugs.ruby-lang.org/issues/19414#change-102553 * Author: noraj (Alexandre ZANNI) * Status: Closed * Priority: Normal * ruby -v: 3.1.3 * Backport: 2.7: UNKNOWN, 3.0: REQUIRED, 3.1: DONE, 3.2: DONTNEED ---------------------------------------- I have a library called [ctf-party](https://github.com/noraj/ctf-party), [making use of URI:WSS](https://github.com/noraj/ctf-party/blob/ef3b82cc1668325b782246a9bb162b18a9b2...), and it's making my [CI pipeline fails](https://github.com/noraj/ctf-party/actions/runs/4059895670). I'm able to reproduce it locally (`bundle exec rake test`), working with ruby 3.2.0 and not with 3.1.3. The error is: ``` irb(main):001:0> require 'uri' => true irb(main):002:0> URI::WS => URI::WS irb(main):003:0> URI::WSS (irb):3:in `<main>': uninitialized constant URI::WSS (NameError) from /home/noraj/.asdf/installs/ruby/3.1.3/lib/ruby/gems/3.1.0/gems/irb-1.4.1/exe/irb:11:in `<top (required)>' from /home/noraj/.asdf/installs/ruby/3.1.3/bin/irb:25:in `load' from /home/noraj/.asdf/installs/ruby/3.1.3/bin/irb:25:in `<main>' ``` I don't understand why is that happening since [it exists in the official documentation](https://ruby-doc.org/3.1.3/stdlibs/uri/URI/WSS.html) and the [code looks ok to me on tag 3.1.3](https://github.com/ruby/ruby/blob/v3_1_3/lib/uri/wss.rb) which is [strictly identical to the code on tag 3.2.0](https://github.com/ruby/ruby/blob/v3_2_0/lib/uri/wss.rb). It works if I require the file explicitly: ``` irb(main):004:0> require 'uri/wss' => true irb(main):005:0> URI::WSS => URI::WSS ``` The issue come from the fact that [in 3.2.0 `'uri/wss'` is required](https://github.com/ruby/ruby/blob/v3_2_0/lib/uri.rb#L104) but [not in 3.1.3](https://github.com/ruby/ruby/blob/v3_1_3/lib/uri.rb#L103). In [3.0.5](https://github.com/ruby/ruby/blob/v3_0_5/lib/uri.rb) it is even worse as neither ws and wss are required. -- https://bugs.ruby-lang.org/
participants (5)
-
duerst
-
hsbt (Hiroshi SHIBATA)
-
jeremyevans0 (Jeremy Evans)
-
nagachika (Tomoyuki Chikanaga)
-
noraj (Alexandre ZANNI)