net-ftp 0.3.0 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/net/ftp.rb +5 -4
  3. metadata +5 -5
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6da1dd16a259cb0b9da3833be6087725451c66020a77484962ce512ebe76bd86
4
- data.tar.gz: 5baf86565938970ff01dca9f6c85d8ae5afa57493ca96c35e8ccb30184f8fd96
3
+ metadata.gz: cbc758bc303474886e8c40fc3acf98ca44e634f4c25c97e6963e13a2ad0cee71
4
+ data.tar.gz: c9a574f98c3e4e9e6f917a67908df8d89d0c773b817995b60540212868e56a5b
5
5
  SHA512:
6
- metadata.gz: b634e82e54a09c1ad7174bafa5049f77f4878c5bf8b5d9fe4f43626c75d83831b91968a211075f5e36c7514c29d7dd2f8834134dc08f4f63def4b6e5a266b991
7
- data.tar.gz: 4b124cb421ad550f889fd5dce46efb22cb726516a1e245131a4d0c5c125c0eb229b8041e952df0c85abed0a8e82697ea3116ef7c1eae1db7ebd09f45ea854355
6
+ metadata.gz: 6cea95f58bdfa8fa8e35bbc6976bb786446da71e1b2931acc1619ee9a6d1a267ccc0e1cf1784c6f3520bd213fe7f056ddb09c6b9749023da65112b4f3bf34f0f
7
+ data.tar.gz: 1c5140e079cb82af2705d0403dcf85c11fb61a848ceb7b284b07f5014210df67dab148df78ad5a3057f2f81762be7cab33c4de5db4eef718c96c32ead39028db
data/lib/net/ftp.rb CHANGED
@@ -85,7 +85,7 @@ module Net
85
85
  end
86
86
 
87
87
  # :stopdoc:
88
- VERSION = "0.3.0"
88
+ VERSION = "0.3.1"
89
89
  FTP_PORT = 21
90
90
  CRLF = "\r\n"
91
91
  DEFAULT_BLOCKSIZE = BufferedIO::BUFSIZE
@@ -577,8 +577,9 @@ module Net
577
577
  if !resp.start_with?("1")
578
578
  raise FTPReplyError, resp
579
579
  end
580
- ensure
581
- conn.close if conn && $!
580
+ rescue
581
+ conn&.close
582
+ raise
582
583
  end
583
584
  else
584
585
  sock = makeport
@@ -1396,7 +1397,7 @@ module Net
1396
1397
  if !resp.start_with?("227")
1397
1398
  raise FTPReplyError, resp
1398
1399
  end
1399
- if m = /\((?<host>\d+(?:,\d+){3}),(?<port>\d+,\d+)\)/.match(resp)
1400
+ if m = /(?<host>\d+(?:,\d+){3}),(?<port>\d+,\d+)/.match(resp)
1400
1401
  if @use_pasv_ip
1401
1402
  host = parse_pasv_ipv4_host(m["host"])
1402
1403
  else
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: net-ftp
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shugo Maeda
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-12-07 00:00:00.000000000 Z
11
+ date: 2023-12-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: net-protocol
@@ -61,7 +61,7 @@ licenses:
61
61
  metadata:
62
62
  homepage_uri: https://github.com/ruby/net-ftp
63
63
  source_code_uri: https://github.com/ruby/net-ftp
64
- post_install_message:
64
+ post_install_message:
65
65
  rdoc_options: []
66
66
  require_paths:
67
67
  - lib
@@ -77,7 +77,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
77
77
  version: '0'
78
78
  requirements: []
79
79
  rubygems_version: 3.5.0.dev
80
- signing_key:
80
+ signing_key:
81
81
  specification_version: 4
82
82
  summary: Support for the File Transfer Protocol.
83
83
  test_files: []