This is an automated email from the ASF dual-hosted git repository.
astitcher pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/qpid-proton.git
The following commit(s) were added to refs/heads/main by this push:
new 346c7792a PROTON-2782: Define DEFAULT_URI_PARSER according to Ruby
version
346c7792a is described below
commit 346c7792a1fb74f16f406d37bfaae7ba59abc628
Author: Eduardo Resende <[email protected]>
AuthorDate: Thu Feb 20 19:27:32 2025 -0300
PROTON-2782: Define DEFAULT_URI_PARSER according to Ruby version
* Fix Qpid::Proton::DEFAULT_URI_PARSER for Ruby 3.4
---
ruby/lib/core/uri.rb | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/ruby/lib/core/uri.rb b/ruby/lib/core/uri.rb
index d5d0dd67a..c1f5671d7 100644
--- a/ruby/lib/core/uri.rb
+++ b/ruby/lib/core/uri.rb
@@ -46,7 +46,12 @@ end
module Qpid::Proton
private
# Make sure to allow empty hostnames, Ruby 2.0.0 does not.
- DEFAULT_URI_PARSER = URI::Parser.new(:HOSTNAME =>
/(?:#{URI::PATTERN::HOSTNAME})|/)
+ DEFAULT_URI_PARSER =
+ if RUBY_VERSION >= '3.4'
+ URI::RFC2396_Parser.new(:HOSTNAME => /(?:#{URI::PATTERN::HOSTNAME})|/)
+ else
+ URI::Parser.new(:HOSTNAME => /(?:#{URI::PATTERN::HOSTNAME})|/)
+ end
public
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]