1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* lib/net/ftp.rb (set_socket): new method.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2649 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
shugo 2002-07-18 02:52:48 +00:00
parent 55a65fd4e9
commit 03b60c7068
2 changed files with 14 additions and 1 deletions

View file

@ -1,3 +1,7 @@
Thu Jul 18 11:52:02 2002 Shugo Maeda <shugo@ruby-lang.org>
* lib/net/ftp.rb (set_socket): new method.
Thu Jul 18 06:51:24 2002 Minero Aoki <aamine@loveruby.net>
* parse.y (yylex): fix typo.

View file

@ -70,6 +70,15 @@ module Net
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)