kgio 2.3.0 → 2.3.1
Sign up to get free protection for your applications and to get access to all the features.
- data/GIT-VERSION-GEN +1 -1
- data/ext/kgio/connect.c +1 -1
- data/test/test_tcp_connect.rb +2 -0
- metadata +4 -4
data/GIT-VERSION-GEN
CHANGED
data/ext/kgio/connect.c
CHANGED
@@ -73,7 +73,7 @@ static VALUE tcp_connect(VALUE klass, VALUE ip, VALUE port, int io_wait)
|
|
73
73
|
hints.ai_socktype = SOCK_STREAM;
|
74
74
|
hints.ai_protocol = IPPROTO_TCP;
|
75
75
|
/* disallow non-deterministic DNS lookups */
|
76
|
-
hints.ai_flags = AI_NUMERICHOST
|
76
|
+
hints.ai_flags = AI_NUMERICHOST;
|
77
77
|
|
78
78
|
rc = getaddrinfo(ipname, ipport, &hints, &res);
|
79
79
|
if (rc != 0)
|
data/test/test_tcp_connect.rb
CHANGED
@@ -44,6 +44,8 @@ class TestKgioTcpConnect < Test::Unit::TestCase
|
|
44
44
|
def test_tcp_socket_new_invalid
|
45
45
|
assert_raises(ArgumentError) { Kgio::TCPSocket.new('example.com', 80) }
|
46
46
|
assert_raises(ArgumentError) { Kgio::TCPSocket.new('999.999.999.999', 80) }
|
47
|
+
assert_raises(TypeError) { Kgio::TCPSocket.new("127.0.0.1", "http") }
|
48
|
+
assert_raises(TypeError) { Kgio::TCPSocket.new('example.com', "http") }
|
47
49
|
end
|
48
50
|
|
49
51
|
def test_tcp_socket_new
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kgio
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 1
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 2
|
8
8
|
- 3
|
9
|
-
-
|
10
|
-
version: 2.3.
|
9
|
+
- 1
|
10
|
+
version: 2.3.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- kgio hackers
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-02-
|
18
|
+
date: 2011-02-14 00:00:00 +00:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|