diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-05-19 00:07:25 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-05-19 00:07:25 +0000 |
commit | d371e3583e3b1e0692f92343017b62d2628190ff (patch) | |
tree | be82924ada754f8542f394d0a3d28e0a0b02a098 /lib/net/ftp.rb | |
parent | 1fae66fca28167ca0e25625091c5df49405b8023 (diff) | |
download | ruby-d371e3583e3b1e0692f92343017b62d2628190ff.tar.gz |
* lib: revert r31635-r31638 and untabify with expand(1).
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31641 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/net/ftp.rb')
-rw-r--r-- | lib/net/ftp.rb | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/lib/net/ftp.rb b/lib/net/ftp.rb index 14c6b07826..97220cccec 100644 --- a/lib/net/ftp.rb +++ b/lib/net/ftp.rb @@ -272,7 +272,7 @@ module Net line = getline buff = line if line[3] == ?- - code = line[0, 3] + code = line[0, 3] begin line = getline buff << "\n" << line @@ -781,15 +781,15 @@ module Net MDTM_REGEXP = /^(\d\d\d\d)(\d\d)(\d\d)(\d\d)(\d\d)(\d\d)/ # :nodoc: - # - # Returns the last modification time of the (remote) file. If +local+ is - # +true+, it is returned as a local time, otherwise it's a UTC time. - # - def mtime(filename, local = false) - str = mdtm(filename) - ary = str.scan(MDTM_REGEXP)[0].collect {|i| i.to_i} - return local ? Time.local(*ary) : Time.gm(*ary) - end + # + # Returns the last modification time of the (remote) file. If +local+ is + # +true+, it is returned as a local time, otherwise it's a UTC time. + # + def mtime(filename, local = false) + str = mdtm(filename) + ary = str.scan(MDTM_REGEXP)[0].collect {|i| i.to_i} + return local ? Time.local(*ary) : Time.gm(*ary) + end # # Creates a remote directory. |