~ubuntu-branches/ubuntu/trusty/ruby1.9/trusty

« back to all changes in this revision

Viewing changes to lib/net/telnet.rb

  • Committer: Bazaar Package Importer
  • Author(s): Stephan Hermann
  • Date: 2008-01-24 11:42:29 UTC
  • mfrom: (1.1.9 upstream)
  • Revision ID: james.westby@ubuntu.com-20080124114229-jw2f87rdxlq6gp11
Tags: 1.9.0.0-2ubuntu1
* Merge from debian unstable, remaining changes:
  - Robustify check for target_os, fixing build failure on lpia.

Show diffs side-by-side

added added

removed removed

Lines of Context:
164
164
    CR   = "\015"   
165
165
    LF   = "\012" 
166
166
    EOL  = CR + LF 
167
 
    REVISION = '$Id: telnet.rb 11708 2007-02-12 23:01:19Z shyouhei $'
 
167
    REVISION = '$Id: telnet.rb 13781 2007-10-25 22:12:53Z jeg2 $'
168
168
    # :startdoc:
169
169
 
170
170
    #
708
708
    # data is also yielded to the block as it is received.
709
709
    def login(options, password = nil) # :yield: recvdata
710
710
      login_prompt = /[Ll]ogin[: ]*\z/n
711
 
      password_prompt = /Password[: ]*\z/n
 
711
      password_prompt = /[Pp]ass(?:word|phrase)[: ]*\z/n
712
712
      if options.kind_of?(Hash)
713
713
        username = options["Name"]
714
714
        password = options["Password"]