Skip to content

Commit 66ab0bb

Browse files
committed
Merge pull request #18 from eugeneius/fix_warnings
Fix warnings
2 parents 58851c5 + 429529b commit 66ab0bb

File tree

5 files changed

+6
-5
lines changed

5 files changed

+6
-5
lines changed

lib/net/ssh/multi/pending_connection.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def remote(port, host, remote_port, remote_host="127.0.0.1")
4343

4444
def replay_on(session)
4545
forward = session.forward
46-
@recordings.each {|args| forward.send *args}
46+
@recordings.each { |args| forward.send(*args) }
4747
end
4848
end
4949

lib/net/ssh/multi/server.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ def initialize(master, host, options={})
5656

5757
@gateway = @options.delete(:via)
5858
@failed = false
59+
@session = @ready_session = nil
5960
end
6061

6162
# Returns the value of the server property with the given +key+. Server

lib/net/ssh/multi/session_actions.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,8 @@ def open_channel(type="session", *extra, &on_confirm)
118118
# end
119119
def exec(command, &block)
120120
open_channel do |channel|
121-
channel.exec(command) do |ch, success|
122-
raise "could not execute command: #{command.inspect} (#{ch[:host]})" unless success
121+
channel.exec(command) do |c, success|
122+
raise "could not execute command: #{command.inspect} (#{c[:host]})" unless success
123123

124124
channel.on_data do |ch, data|
125125
if block

test/channel_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
class ChannelTest < Minitest::Test
55
def test_each_should_iterate_over_each_component_channel
6-
channels = [c1 = mock('channel'), c2 = mock('channel'), c3 = mock('channel')]
6+
channels = [mock('channel'), mock('channel'), mock('channel')]
77
channel = Net::SSH::Multi::Channel.new(mock('session'), channels)
88
result = []
99
channel.each { |c| result << c }

test/session_actions_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ def test_exec_with_block_should_pass_data_and_extended_data_to_block
9494
c.expects(:on_extended_data).yields(c, 1, "stderr")
9595
c.expects(:on_request)
9696
results = {}
97-
@session.exec("something") do |c, stream, data|
97+
@session.exec("something") do |_, stream, data|
9898
results[stream] = data
9999
end
100100
assert_equal({:stdout => "stdout", :stderr => "stderr"}, results)

0 commit comments

Comments
 (0)