NO-JIRA: [ruby] Clean up 'ruby -W2' warnings
Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/5a34fda9 Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/5a34fda9 Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/5a34fda9 Branch: refs/heads/go1 Commit: 5a34fda9d3844d27c8ef2349246e930e66299593 Parents: a65a175 Author: Alan Conway <acon...@redhat.com> Authored: Thu Mar 22 10:28:16 2018 -0400 Committer: Alan Conway <acon...@redhat.com> Committed: Fri Mar 23 09:39:39 2018 -0400 ---------------------------------------------------------------------- proton-c/bindings/ruby/lib/core/container.rb | 1 + proton-c/bindings/ruby/lib/core/transport.rb | 1 + proton-c/bindings/ruby/lib/types/array.rb | 1 + proton-c/bindings/ruby/tests/test_container.rb | 4 +++- proton-c/bindings/ruby/tests/test_tools.rb | 1 - 5 files changed, 6 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/5a34fda9/proton-c/bindings/ruby/lib/core/container.rb ---------------------------------------------------------------------- diff --git a/proton-c/bindings/ruby/lib/core/container.rb b/proton-c/bindings/ruby/lib/core/container.rb index d4fe5d1..f8ff032 100644 --- a/proton-c/bindings/ruby/lib/core/container.rb +++ b/proton-c/bindings/ruby/lib/core/container.rb @@ -205,6 +205,7 @@ module Qpid::Proton # concurrently. # def initialize(*args) + @handler, @id, @panic = nil case args.size when 2 then @handler, @id = args when 1 then http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/5a34fda9/proton-c/bindings/ruby/lib/core/transport.rb ---------------------------------------------------------------------- diff --git a/proton-c/bindings/ruby/lib/core/transport.rb b/proton-c/bindings/ruby/lib/core/transport.rb index e629b0c..6a6c4f5 100644 --- a/proton-c/bindings/ruby/lib/core/transport.rb +++ b/proton-c/bindings/ruby/lib/core/transport.rb @@ -170,6 +170,7 @@ module Qpid::Proton # Creates a new transport instance. def initialize(impl = Cproton.pn_transport) @impl = impl + @ssl = nil self.class.store_instance(self, :pn_transport_attachments) end http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/5a34fda9/proton-c/bindings/ruby/lib/types/array.rb ---------------------------------------------------------------------- diff --git a/proton-c/bindings/ruby/lib/types/array.rb b/proton-c/bindings/ruby/lib/types/array.rb index d7e15e6..62d9274 100644 --- a/proton-c/bindings/ruby/lib/types/array.rb +++ b/proton-c/bindings/ruby/lib/types/array.rb @@ -49,6 +49,7 @@ module Qpid::Proton # @param descriptor [Object] Optional array descriptor def initialize(type, elements=nil, descriptor=nil) @type, @descriptor = type, descriptor + @proton_array_header = nil raise ArgumentError, "no type specified for array" if @type.nil? super elements if elements end http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/5a34fda9/proton-c/bindings/ruby/tests/test_container.rb ---------------------------------------------------------------------- diff --git a/proton-c/bindings/ruby/tests/test_container.rb b/proton-c/bindings/ruby/tests/test_container.rb index a0c32ed..faa505a 100644 --- a/proton-c/bindings/ruby/tests/test_container.rb +++ b/proton-c/bindings/ruby/tests/test_container.rb @@ -32,6 +32,8 @@ class ContainerTest < MiniTest::Test send_handler = Class.new(ExceptionMessagingHandler) do attr_reader :accepted, :sent + def initialize() @sent, @accepted = nil; end + def on_sendable(sender) unless @sent m = Message.new("hello") @@ -152,7 +154,7 @@ class ContainerTest < MiniTest::Test def test_bad_host cont = Container.new(__method__) assert_raises (SocketError) { cont.listen("badlisten.example.com:999") } - assert_raises (SocketError) { c = cont.connect("badconnect.example.com:999") } + assert_raises (SocketError) { cont.connect("badconnect.example.com:999") } end # Verify that connection options are sent to the peer http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/5a34fda9/proton-c/bindings/ruby/tests/test_tools.rb ---------------------------------------------------------------------- diff --git a/proton-c/bindings/ruby/tests/test_tools.rb b/proton-c/bindings/ruby/tests/test_tools.rb index 911669b..091322d 100644 --- a/proton-c/bindings/ruby/tests/test_tools.rb +++ b/proton-c/bindings/ruby/tests/test_tools.rb @@ -105,7 +105,6 @@ end # Add port/url to Listener, assuming a TCP socket class Qpid::Proton::Listener - def port() to_io.addr[1]; end def url() "amqp://:#{port}"; end end --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@qpid.apache.org For additional commands, e-mail: commits-h...@qpid.apache.org