[
https://issues.apache.org/jira/browse/PROTON-2498?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17490571#comment-17490571
]
Andrew Stitcher commented on PROTON-2498:
-----------------------------------------
This is due to the built in library URI no longer exporting the schemes class
variable. Previously the way to register new schemes was documented to be:
{{@@schemes['scheme'] = klass}}
now it is documented to be:
{{register_scheme 'scheme', klass}}
Unfortunately, {{register_scheme}} isn't present before ruby 3.1 so the new
documented way can't be used!
Fortunately {{scheme_list()}} which returns the {{@@schemes}} hash is present
both for ruby 2 and ruby 3.
> Ruby binding fails to test with ruby 3.1
> ----------------------------------------
>
> Key: PROTON-2498
> URL: https://issues.apache.org/jira/browse/PROTON-2498
> Project: Qpid Proton
> Issue Type: Bug
> Components: ruby-binding
> Reporter: Andrew Stitcher
> Assignee: Andrew Stitcher
> Priority: Major
>
> When you build/test proton on a really recent version of ruby the test phase
> fails (this is on fedora rawhide):
> {noformat}
> 29: Test command: /usr/bin/python3.10
> "/home/jenkins/workspace/proton/proton-rawhide-main/source/scripts/env.py"
> "--"
> "PATH=/home/jenkins/workspace/proton/proton-rawhide-main/source/build/ruby:/home/jenkins/workspace/proton/proton-rawhide-main/source/build/c:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
>
> "RUBYLIB=/home/jenkins/workspace/proton/proton-rawhide-main/source/ruby/lib:/home/jenkins/workspace/proton/proton-rawhide-main/source/ruby/tests:/home/jenkins/workspace/proton/proton-rawhide-main/source/ruby/spec:/home/jenkins/workspace/proton/proton-rawhide-main/source/build/ruby:/home/jenkins/workspace/proton/proton-rawhide-main/source/build/c:"
>
> "COVERAGE_DIR=/home/jenkins/workspace/proton/proton-rawhide-main/source/build/ruby/coverage"
> "SASLPASSWD=/usr/sbin/saslpasswd2" "TEST_EXE_PREFIX=/usr/bin/valgrind
> --tool=memcheck --leak-check=full --error-exitcode=42 --quiet
> --suppressions=/home/jenkins/workspace/proton/proton-rawhide-main/source/tests/valgrind.supp"
> "/usr/bin/ruby" "testme" "-v"
> 29: Test timeout computed to be: 360
> 29:
> /home/jenkins/workspace/proton/proton-rawhide-main/source/ruby/lib/core/uri.rb:30:in
> `<module:URI>': uninitialized class variable @@schemes in URI (NameError)
> 29: Did you mean? scheme_list
> 29: from
> /home/jenkins/workspace/proton/proton-rawhide-main/source/ruby/lib/core/uri.rb:22:in
> `<top (required)>'
> 29: from
> <internal:/usr/share/rubygems/rubygems/core_ext/kernel_require.rb>:85:in
> `require'
> 29: from
> <internal:/usr/share/rubygems/rubygems/core_ext/kernel_require.rb>:85:in
> `require'
> 29: from
> /home/jenkins/workspace/proton/proton-rawhide-main/source/ruby/lib/qpid_proton.rb:64:in
> `<top (required)>'
> 29: from
> <internal:/usr/share/rubygems/rubygems/core_ext/kernel_require.rb>:85:in
> `require'
> 29: from
> <internal:/usr/share/rubygems/rubygems/core_ext/kernel_require.rb>:85:in
> `require'
> 29: from testme:22:in `<main>'
> 29/48 Test #29: ruby-example-test ................***Failed 0.18 sec
> {noformat}
--
This message was sent by Atlassian Jira
(v8.20.1#820001)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]