diff --git a/ChangeLog b/ChangeLog index 9fd5895bb8..f16fd9b7d8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Thu Jul 18 11:52:02 2002 Shugo Maeda + + * lib/net/ftp.rb (set_socket): new method. + Thu Jul 18 06:51:24 2002 Minero Aoki * parse.y (yylex): fix typo. diff --git a/lib/net/ftp.rb b/lib/net/ftp.rb index 75e087a20c..fdd1b5ffa9 100644 --- a/lib/net/ftp.rb +++ b/lib/net/ftp.rb @@ -69,7 +69,16 @@ module Net voidresp end end - + + def set_socket(sock, get_greeting = true) + synchronize do + @sock = sock + if get_greeting + voidresp + end + end + end + def sanitize(s) if s =~ /^PASS /i return s[0, 5] + "*" * (s.length - 5)