Repository: qpid-proton
Updated Branches:
  refs/heads/master b471fcfd1 -> f1100fea2


NO-JIRA: [ruby] extra URI tests, better exception message.


Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/f1100fea
Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/f1100fea
Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/f1100fea

Branch: refs/heads/master
Commit: f1100fea2b67538b277d2f4c60f795de1320c6a3
Parents: b471fcf
Author: Alan Conway <acon...@redhat.com>
Authored: Wed Mar 7 23:48:25 2018 -0500
Committer: Alan Conway <acon...@redhat.com>
Committed: Wed Mar 7 23:48:25 2018 -0500

----------------------------------------------------------------------
 proton-c/bindings/ruby/lib/core/uri.rb   | 2 ++
 proton-c/bindings/ruby/tests/test_uri.rb | 2 ++
 2 files changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/f1100fea/proton-c/bindings/ruby/lib/core/uri.rb
----------------------------------------------------------------------
diff --git a/proton-c/bindings/ruby/lib/core/uri.rb 
b/proton-c/bindings/ruby/lib/core/uri.rb
index 272c2d2..7518ce1 100644
--- a/proton-c/bindings/ruby/lib/core/uri.rb
+++ b/proton-c/bindings/ruby/lib/core/uri.rb
@@ -75,5 +75,7 @@ module Qpid::Proton
       else DEFAULT_URI_PARSER.parse("amqp://#{s}")            # Treat as a 
bare host:port/path string
       end
     end
+  rescue =>e
+    raise e.class, "#{self}.#{__method__}(#{s.inspect}): #{e}"
   end
 end

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/f1100fea/proton-c/bindings/ruby/tests/test_uri.rb
----------------------------------------------------------------------
diff --git a/proton-c/bindings/ruby/tests/test_uri.rb 
b/proton-c/bindings/ruby/tests/test_uri.rb
index c531371..3587d93 100644
--- a/proton-c/bindings/ruby/tests/test_uri.rb
+++ b/proton-c/bindings/ruby/tests/test_uri.rb
@@ -67,6 +67,8 @@ class TestURI < MiniTest::Test
     assert_equal URI("amqp://h:1"), uri("h:1")
     assert_equal URI("amqp://h"), uri("h")
     assert_equal URI("amqp://h"), uri("h:")
+    assert_equal ["amqp", nil, "", 5672, ""], uri_parts("")
+    assert_equal ["amqp", nil, "", 5672, ""], uri_parts(":")
     assert_equal ["amqp", nil, "", 1, ""], uri_parts(":1")
     assert_equal ["amqp", nil, "", 1, ""], uri_parts("amqp://:1")
     assert_equal URI("amqp://[::1:2]:1"), uri("[::1:2]:1")


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@qpid.apache.org
For additional commands, e-mail: commits-h...@qpid.apache.org

Reply via email to