This pull request fixes some warnings that occur when running with -w.
The list of warnings was (path changed in the messages below):
/Path/to/.rvm/gems/ruby-1.9.3-p327/gems/net-ssh-2.6.2/lib/net/ssh/transport/algorithms.rb:266: warning: assigned but unused variable - first_kex_packet_follows
/Path/to/.rvm/gems/ruby-1.9.3-p327/gems/net-ssh-2.6.2/lib/net/ssh/buffer.rb:264: warning: assigned but unused variable - e
/Path/to/.rvm/gems/ruby-1.9.3-p327/gems/net-ssh-2.6.2/lib/net/ssh/transport/openssl.rb:156: warning: assigned but unused variable - e
/Path/to/.rvm/gems/ruby-1.9.3-p327/gems/net-ssh-2.6.2/lib/net/ssh/transport/key_expander.rb:25: warning: mismatched indentations at 'end' with 'module' at 2
/Path/to/.rvm/gems/ruby-1.9.3-p327/gems/net-ssh-2.6.2/lib/net/ssh/transport/server_version.rb:49: warning: assigned but unused variable - e
/Path/to/.rvm/gems/ruby-1.9.3-p327/gems/net-ssh-2.6.2/lib/net/ssh/transport/packet_stream.rb:218: warning: assigned but unused variable - padding
/Path/to/.rvm/gems/ruby-1.9.3-p327/gems/net-ssh-2.6.2/lib/net/ssh/authentication/session.rb:73: warning: assigned but unused variable - ne
/Path/to/.rvm/gems/ruby-1.9.3-p327/gems/net-ssh-2.6.2/lib/net/ssh/authentication/session.rb:57: warning: assigned but unused variable - message
/Path/to/.rvm/gems/ruby-1.9.3-p327/gems/net-ssh-2.6.2/lib/net/ssh/key_factory.rb:108: warning: assigned but unused variable - type
/Path/to/.rvm/gems/ruby-1.9.3-p327/gems/net-ssh-2.6.2/lib/net/ssh/authentication/methods/keyboard_interactive.rb:45: warning: assigned but unused variable - lang_tag
I've tried to make appropriate changes, but not being very familiar with the codebase, I'm not sure I succeeded... ;]
Tests all pass in MRI 1.9.3 (including the port forwarding tests) and after running setup.rb the warnings disappeared on my machine.
I noticed that under MRI 1.9.2 the tests below fail, but that was happening prior to my changes already, so I don't think I introduced new problems there.
MRI 1.9.1 just doesn't seem to work at all for me, so I didn't dig much into that. I'm not sure if the current Net::SSH is still supposed to be compatible with 1.9.1.
Under JRuby-1.7.1 all the enabled tests passed, but the port forwarding tests did not all pass (see below for the list). Again, this is similar to MRI 1.9.2 in that those tests also failed prior to my changes.
Note that I've used the _ (underscore) variable to suppress warnings in lib/net/ssh/authentication/methods/keyboard_interactive.rb and lib/net/ssh/key_factory.rb since the variables they declared don't seem to be used anywhere.
I commented out the first_kex_packet_follows variable assignment since that seems to be part of a TODO anyway.
Thanks for the patch. It'll be in the next release.
re: testing, I'm testing primarily with 1.9.3 but I'm happy to pull patches for others.