akr
b4e50055c3
* ext/socket/extconf.rb: check getpeereid.
...
* ext/socket/basicsocket.c (bsock_getpeereid): new method.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22219 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-11 01:22:08 +00:00
akr
1463f1dfe7
* ext/socket/lib/socket.rb (Socket.udp_server_sockets): new method.
...
(Socket.udp_server_loop_on): new method.
(Socket.udp_server_loop): new method
(Socket.ip_sockets_port0): extracted from tcp_server_sockets_port0.
(Socket::UDPSource): new class.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22212 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-10 12:38:16 +00:00
akr
98d3eca7fc
* ext/socket/option.c (sockopt_s_bool): new method.
...
(sockopt_bool): new method.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22210 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-10 12:09:57 +00:00
akr
fd9c7e8af1
* ext/socket/ancdata.c (ancillary_initialize): add family argument.
...
(ancdata_new): ditto.
(ancillary_s_int): ditto.
(ancillary_family): new function.
(ancillary_family_m): new method.
(ancillary_s_ip_pktinfo): follow ancdata_new change.
(ancillary_s_ipv6_pktinfo): ditto.
(bsock_recvmsg_internal): examine the socket address family.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22175 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-09 10:49:16 +00:00
akr
64f12a46d5
* ext/socket/option.c (inspect_peercred): struct ucred contains
...
effective uid/gid.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22144 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-08 17:04:40 +00:00
akr
2992642245
LOCAL_PEERCRED is also available on MacOS X.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22140 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-08 15:49:35 +00:00
akr
f11d2b55f7
* ext/socket/option.c (inspect_local_peercred): cr_uid is a effective
...
uid, not a real uid.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22138 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-08 15:42:17 +00:00
akr
9e45748143
* ext/socket/extconf.rb: check sys/param.h and sys/ucred.h.
...
* ext/socket/rubysocket.h: include sys/param.h and sys/ucred.h.
* ext/socket/option.c (inspect_local_peercred): new function to show
LOCAL_PEERCRED socket option on FreeBSD.
(sockopt_inspect): show as LOCAL_* socket option if AF_UNIX and level
is 0.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22137 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-08 15:37:55 +00:00
mame
3e11901f1c
* enumerator.c (enumerator_with_index): receives one argument which
...
represents a start offset. [ruby-dev:37921]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22134 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-08 14:42:01 +00:00
akr
e5f588c83d
remove debug print.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22133 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-08 14:39:59 +00:00
akr
8f9d6d1863
* ext/socket/option.c (inspect_peercred): new function to show
...
SO_PEERCRED socket option.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22131 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-08 14:23:16 +00:00
akr
411e9997d2
* ext/socket/extconf.rb: check struct cmsgcred.
...
* ext/socket/ancdata.c (anc_inspect_passcred_credentials): add
"(ucred)".
(anc_inspect_socket_creds): show struct cmsgcred too, for FreeBSD.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22129 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-08 12:53:55 +00:00
akr
eb636217f6
test renamed.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22127 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-08 11:37:39 +00:00
akr
e960cf417a
* ext/socket/extconf.rb: check struct sockcred.
...
* ext/socket/ancdata.c (anc_inspect_socket_creds): new function to
show SCM_CREDS on NetBSD.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22126 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-08 11:36:18 +00:00
akr
732b695163
add a test.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22125 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-08 11:30:26 +00:00
akr
03149710e8
* ext/socket/raddrinfo.c (init_unix_addrinfo): add socktype argument.
...
(addrinfo_initialize): follow init_unix_addrinfo change.
(addrinfo_s_unix): add optional argument: socktype
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22120 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-08 04:53:17 +00:00
akr
6294d065bb
select before read_nonblock.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22117 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-08 02:01:22 +00:00
akr
ad235344c4
specify exception class for rescue clause.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22114 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-08 00:10:13 +00:00
akr
b83188dc1e
add a test.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22112 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-07 12:33:25 +00:00
akr
2b8ab6c54f
* test/socket/test_addrinfo.rb (test_family_addrinfo): don't use
...
www.ruby-lang.org.
http://d.hatena.ne.jp/nagachika/20090204/working_for_0f0e
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22111 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-07 12:28:15 +00:00
akr
af14ba145e
test setrlimit in a child process.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22107 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-07 10:22:20 +00:00
nobu
d89dbc4d3b
* test/etc/test_etc.rb: trivial.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22100 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-06 15:26:36 +00:00
akr
fb128ef26f
no need to restore rlimit in child process.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22090 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-06 11:36:23 +00:00
akr
88f04bdd32
* ext/socket: AddrInfo is renamed to Addrinfo. [ruby-dev:37876]
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22077 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-05 11:01:43 +00:00
akr
0d0fe1a5ad
don't connect to unspecified address (0.0.0.0). OpenBSD reject it.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22064 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-05 00:09:39 +00:00
akr
1934c7a80b
test relaxed.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22046 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-04 15:42:13 +00:00
akr
3eab19122b
add tests.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22045 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-04 15:34:32 +00:00
akr
e2f0aeb497
relax tests for MacOS X.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22044 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-04 15:12:53 +00:00
akr
9845b50c11
relax tests for IPv4 compat/mapped IPv6 addresss.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22040 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-04 13:38:24 +00:00
mame
c07b4ef145
* test/etc/test_etc.rb(test_getpwnam, test_getgrgid, test_getgrnam):
...
support an envirionment that has duplicative entries. a patch from
Tomoyuki Chikanaga <chikanag at nippon-control-system.co.jp> in
[ruby-dev:37882].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22021 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-03 15:39:44 +00:00
akr
5a56fc35ec
don't connect to unspecified address.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22018 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-03 14:50:50 +00:00
kouji
d60cd5b379
* ext/readline/extconf.rb: checked rl_set_screen_size and
...
rl_get_screen_size.
* ext/readline/readline.c (readline_s_set_screen_size): added
Readline.set_screen_size.
* ext/readline/readline.c (readline_s_get_screen_size): added
Readline.get_screen_size.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22014 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-03 12:21:08 +00:00
akr
24eafe8376
* ext/socket/lib/socket.rb (Socket.tcp_server_sockets_port0): new
...
private function for allocating same port both IPv4 and IPv6.
(Socket.tcp_server_sockets): use tcp_server_sockets_port0 for port 0.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22007 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-03 07:25:57 +00:00
akr
260d0d0399
add a test.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22006 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-03 06:37:06 +00:00
akr
4aec56ba71
add tests.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22005 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-03 06:27:07 +00:00
akr
1643d1c28a
add tests.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22004 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-03 06:12:23 +00:00
akr
2df1053c1d
add a test.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21991 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-02 23:30:46 +00:00
nobu
fe39ce87dd
* test/ruby/test_readpartial.rb (make_pipe): readpartial does not
...
work in text mode.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21990 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-02 23:21:10 +00:00
yugui
1d551324bb
adds a test case for r21955 and r21917.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21974 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-02 11:33:08 +00:00
akr
352dcd9ee7
* test/socket/test_addrinfo.rb: use AddrInfo.getaddrinfo to generate
...
IPv6 address. AddrInfo.ip generates IPv4 address for IPv4 mapped
IPv6 address if --with-lookup-order-hack=INET.
[ruby-dev:37868]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21968 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-02 10:59:17 +00:00
akr
41eb896e09
* version.h: bump up to 1.9.2 patchlevel -1.
...
yugui recommend "-1" strongly.
* lib/rubygems/version.rb: accept negative patchlevel.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21951 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-02 07:07:59 +00:00
akr
5ad05f37a5
* ext/socket/socket.c (sock_initialize): make 3rd argument, protocol,
...
optional.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21950 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-02 05:55:56 +00:00
nobu
ce720ca0dc
* sample/test.rb (valid_syntax?), test/ruby/test_system.rb
...
(TestSystem::valid_syntax?): use catch and throw instead of
return inside BEGIN block.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21944 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-02 03:39:01 +00:00
akr
61fc0c6cf4
* ext/socket/rubysocket.h (cmsg_type_arg): declared.
...
(Init_ancdata): ditto.
* ext/socket/init.c (Init_socket_init): call Init_ancdata.
* ext/socket/constants.c (cmsg_type_arg): defined.
* ext/socket/depend: add dependency for ancdata.o.
* ext/socket/mkconstants.rb: generate scm_optname_to_int.
more constants.
* ext/socket/extconf.rb: add ancdata.o.
* ext/socket/ancdata.c: new file. new method
BasicSocket#{sendmsg,sendmsg_nonblock,recvmsg,recvmsg_nonblock}
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21943 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-02 02:51:02 +00:00
akr
ef9206bbea
* ext/socket/rubysocket.h (rb_cSockOpt): declared.
...
(sockopt_new): ditto.
(Init_sockopt): ditto.
* ext/socket/init.c (Init_socket_init): call Init_sockopt.
* ext/socket/depend: add dependency for option.o
* ext/socket/mkconstants.rb: generate intern_level, intern_so_optname,
intern_ip_optname, intern_ipv6_optname, intern_tcp_optname,
intern_udp_optname and intern_scm_optname.
* ext/socket/extconf.rb: add option.o.
* ext/socket/basicsocket.c (bsock_setsockopt): accept Socket::Option
object.
(bsock_getsockopt): return Socket::Option object.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21936 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-02 01:53:02 +00:00
akr
f1137963e3
* ext/socket/raddrinfo.c (addrinfo_ipv4_private_p): new method.
...
(addrinfo_ipv4_loopback_p): ditto.
(addrinfo_ipv4_multicast_p): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21928 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-01 12:28:50 +00:00
akr
849e730f15
* ext/socket/raddrinfo.c (addrinfo_ipv6_unspecified_p): new method.
...
(addrinfo_ipv6_loopback_p): ditto.
(addrinfo_ipv6_multicast_p): ditto.
(addrinfo_ipv6_linklocal_p): ditto.
(addrinfo_ipv6_sitelocal_p): ditto.
(addrinfo_ipv6_v4mapped_p): ditto.
(addrinfo_ipv6_v4compat_p): ditto.
(addrinfo_ipv6_mc_nodelocal_p): ditto.
(addrinfo_ipv6_mc_linklocal_p): ditto.
(addrinfo_ipv6_mc_sitelocal_p): ditto.
(addrinfo_ipv6_mc_orglocal_p): ditto.
(addrinfo_ipv6_mc_global_p): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21919 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-31 11:09:51 +00:00
akr
b9faa6b74c
add a test.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21918 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-31 10:15:30 +00:00
akr
e94e674d0e
* lib/pathname.rb (Pathname#realdirpath): new method.
...
[ruby-dev:36290]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21904 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-30 12:50:55 +00:00
akr
e0469eea59
add tests.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21885 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-29 18:02:25 +00:00