On Sun, Mar 25, 2012 at 9:36 PM, Thufir <hawat.thufir / gmail.com> wrote:

> http://rubydoc.info/gems/net-ssh-telnet/0.0.2/frames
>
> example 1:
>
> s = Net::SSH::Telnet.new(
> Dump_log" => "/dev/stdout",
> Session" => ssh
> )
> puts "Logged in"
> p s.cmd("echo hello")
>
> That's not my code, that's the sample code.

Really? Here's what I see in Example 1 --

----------------------------------------------------------
Example 1 - pass existing Net::SSH::Session object

ssh = Net::SSH.start("127.0.0.1",
      :username=>"test123",
      :password=>"pass456"
)
s = Net::SSH::Telnet.new(
      "Dump_log" => "/dev/stdout",
      "Session" => ssh
)
puts "Logged in"
p s.cmd("echo hello")
----------------------------------------------------------

> ɧ  > sample code, when copied, pasted, gives errors as so:

> ssh.rb:10:in `<main>': undefined local variable or method `ssh'

Because you didn't copy all of it, and the variable 'ssh' in your broken
abbreviated test isn't defined.

Just what the error message says, unsurprisingly :-)

-- 
Hassan Schroeder ------------------------ hassan.schroeder / gmail.com
http://about.me/hassanschroeder
twitter: @hassan