summaryrefslogtreecommitdiff
path: root/ext/socket
AgeCommit message (Collapse)Author
2007-08-25* encoding.c: provide basic features for M17N.matz
* parse.y: encoding aware parsing. * parse.y (pragma_encoding): encoding specification pragma. * parse.y (rb_intern3): encoding specified symbols. * string.c (rb_str_length): length based on characters. for older behavior, bytesize method added. * string.c (rb_str_index_m): index based on characters. rindex as well. * string.c (succ_char): encoding aware succeeding string. * string.c (rb_str_reverse): reverse based on characters. * string.c (rb_str_inspect): encoding aware string description. * string.c (rb_str_upcase_bang): encoding aware case conversion. downcase, capitalize, swapcase as well. * string.c (rb_str_tr_bang): tr based on characters. delete, squeeze, tr_s, count as well. * string.c (rb_str_split_m): split based on characters. * string.c (rb_str_each_line): encoding aware each_line. * string.c (rb_str_each_char): added. iteration based on characters. * string.c (rb_str_strip_bang): encoding aware whitespace stripping. lstrip, rstrip as well. * string.c (rb_str_justify): encoding aware justifying (ljust, rjust, center). * string.c (str_encoding): get encoding attribute from a string. * re.c (rb_reg_initialize): encoding aware regular expression * sprintf.c (rb_str_format): formatting (i.e. length count) based on characters. * io.c (rb_io_getc): getc to return one-character string. for older behavior, getbyte method added. * ext/stringio/stringio.c (strio_getc): ditto. * io.c (rb_io_ungetc): allow pushing arbitrary string at the current reading point. * ext/stringio/stringio.c (strio_ungetc): ditto. * ext/strscan/strscan.c: encoding support. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13261 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-07-22* file.c (rb_file_s_rename): deleted code to get rid of a bug ofnobu
old Cygwin. * file.c (rb_file_truncate): added prototype of GetLastError() on cygwin. [ruby-dev:31239] * include/ruby/intern.h (is_ruby_native_thread): prototype. * missing/strftime.c (strftime): fix printf format and actual arguments. * ext/Win32API/Win32API.c (Win32API_initialize): ditto. * ext/tk/tcltklib.c (ip_finalize): ditto. * ext/win32ole/win32ole.c (lcid_installed): ditto. * ext/socket/getnameinfo.c: include stdio.h always. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12836 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-10* include/ruby: moved public headers.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12501 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-04-25clear cmsg padding.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12220 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-04-25* ext/socket/socket.c (unix_send_io, unix_recv_io): use CMSG_DATA toakr
align file descriptor appropriately. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12217 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-04-03 * ext/socket/socket.c (s_recv, s_recvfrom): some systems (such asusa
windows) doesn't set fromlen if the socket is connection-oriented. reported by Bram Whillock in [ruby-core:10512] [ruby-Bugs#9061] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12138 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-03-19* regparse.c, etc.: K&R to ANSI code cleanup patch from Stefanmatz
Huehner <stefan at huehner.org>. [ruby-core:10543] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12095 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-02-24* file.c, gc.c, io.c, ruby.h, rubyio.h, win32/win32.h (rb_io_t):nobu
renamed from OpenFile. * ext/dl/cptr.c, ext/io/wait/wait.c, ext/openssl/ossl.h, ext/openssl/ossl_bio.c, ext/openssl/ossl_ssl.c, ext/pty/pty.c, ext/readline/readline.c, ext/socket/socket.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11869 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-02-19* ext/socket/socket.c (unix_peeraddr): wrong syscall name in errormatz
message for #peeraddr. a patch from Sam Roberts <sroberts at uniserve.com>. [ruby-core:10366] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11778 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-02-13* ext/socket/socket.c (init_unixsock): path may contain NUL formatz
abstract unix sockets. [ruby-core:10288] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11712 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-01-22* ext/socket/socket.c: fix errors in socket sample code.matz
[ruby-core:09992] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11552 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-11-02* ext/socket/socket.c (ruby_getnameinfo__aix): AF_INET6 workaroundmatz
for AIX. a patch from Yutaka Kanemoto <kinpoco AT gmail.com>. [ruby-dev:29744] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11272 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-09-26socket.c: a rdoc patch from Daniel Berger <djberg96 at gmail.com>matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11039 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-09-02* ext/socket/socket.c (ruby_connect): sockerrlen should be socklen_t.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10843 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-09-02* ext/socket/extconf.rb: check arpa/inet.h for ntohs.akr
* ext/socket/socket.c: include arpa/inet.h if available. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10842 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-09-02* ruby.h (struct RArray): embed small arrays.matz
(RARRAY_LEN): defined for accessing array members. (RARRAY_PTR): ditto. * array.c: use RARRAY_LEN and RARRAY_PTR. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10833 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-09-01* ext/socket/socket.c (socks_init): typo fixed. a patch from Svenmatz
Klemm <sven at c3d2.de>. [ruby-core:08770] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10821 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-08-31* ruby.h (struct RString): embed small strings.matz
(RSTRING_LEN): defined for accessing string members. (RSTRING_PTR): ditto. * string.c: use RSTRING_LEN and RSTRING_PTR. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10809 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-08-13* ext/socket/socket.c: ANSIfied. [ruby-core:08601]akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10722 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-08-07* configure.in, common.mk: AIX link issue. a patch from Yutakamatz
Kanemoto <kinpoco at gmail.com>. [ruby-dev:29190] * ext/socket/socket.c: AIX socket support. [ruby-dev:29190] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10695 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-06-27* string.c: RDoc update for =~ method. a patch from Alex Youngmatz
<alex at blackkettle.org>. [ruby-core:08068] * io.c (pipe_open): backout unnecessary fix on 2006-06-26. [ruby-dev:28865] * eval.c (rb_yield_0): exact argument number check now done only for lambda Proc. * eval.c (rb_yield_0): add check for number of arguments, if there's one lambda block parameter. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10412 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-06-26* ext/socket/socket.c (bsock_recv_nonblock): new methodakr
BasicSocket#recv_nonblock. (udp_recvfrom_nonblock): renamed from ip_recvfrom_nonblock. IPSocket#recvfrom_nonblock is moved to UDPSocket#recvfrom_nonblock. (unix_recvfrom_nonblock): removed. UNIXSocket#recvfrom_nonblock is removed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10403 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-06-26revert sock_sysaccept addition to [ruby-dev:28861].akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10399 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-06-26* ext/socket/socket.c (sock_accept): revert to avoid ambiguity ofmatz
argument evaluation order. [ruby-dev:28861] * ext/socket/socket.c (sock_accept_nonblock): ditto. * io.c (pipe_open): avoid closing uninitialized file descriptors. a patch from <tommy at tmtm.org> [ruby-dev:28600] * parse.y: replace terminal token names with more descriptive name, i.e. kEND to keyword_end. [ruby-list:42477] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10397 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-06-24add extconf.h to .cvsignore.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10375 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-06-21* ext/socket/socket.c (sock_s_socketpair): try GC only once.akr
[ruby-dev:28778] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10362 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-06-21* ext/socket/getaddrinfo.c (freeaddrinfo, get_name): fixed typo.usa
* ext/tk/tcltklib.c (tcl_eval, tcl_global_eva): ditto. * ext/zlib/zlib.c (rscheck): constified. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10358 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-06-20* eval.c, file.c, etc.: code-cleanup patch from Stefan Huehnermatz
<stefan at huehner.org>. [ruby-core:08029] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10351 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-06-19* ext/socket/socket.c (unix_sysaccept): typo fixed.matz
* ext/socket/socket.c (sock_connect): remove an unused local variable tmpaddr. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10323 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-06-19* ext/socket/socket.c (tcp_accept_nonblock): forgot to removematz
abandoned hacks. [ruby-dev:28740] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10322 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-06-17* eval.c (Init_eval): add aliases invoke_method andmatz
invoke_functional_method corresponding send and funcall respectively. [ruby-talk:197512] * parse.y (parser_yylex): returns the most typical keyword token on EXPR_FNAME. [ruby-core:7995] * ext/socket/socket.c: protoize. * parse.y (then): remove ':' from 'then' and 'do' rules. * hash.c (env_aset): raise TypeError on nil with more descriptive message. [ruby-core:07990] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10304 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-06-13* ext/socket/socket.c (Init_socket): remove obsolete constants:matz
IPsocket, TCPsocket, SOCKSsocket, TCPserver, UDPsocket, UNIXsocket, UNIXserver. * eval.c (formal_assign): post splat arguments should have had higher priority than optional arguments, since they are mandatory. [ruby-dev:28715] * eval.c (VIS_MASK): broken. should be 15. [ruby-dev:28715] * io.c (argf_getc): should return one-character string. [ruby-dev:28715] * io.c (rb_io_readchar): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10257 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-06-05* ext/socket/socket.c (sock_s_unpack_sockaddr_in): rejectakr
non-AF_INET/AF_INET6 sockaddr. (sock_s_unpack_sockaddr_un): reject non-AF_UNIX sockaddr. [ruby-dev:28691] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10218 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-06-04* ext/socket/socket.c: fix sockaddr_un handling.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10212 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-06-02update doc.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10210 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-06-01fix a comment.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10207 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-06-01* ext/socket/socket.c (s_recvfrom): alen may be zero with UNIXSocketakr
too. (tested on NetBSD 3.0) (s_recvfrom_nonblock): extracted from sock_recvfrom_nonblock. (sock_recvfrom_nonblock): use s_recvfrom_nonblock. (ip_recvfrom_nonblock): new method: IPSocket#recvfrom_nonblock (unix_recvfrom_nonblock): new method: UNIXSocket#recvfrom_nonblock (s_accept_nonblock): extracted from sock_accept_nonblock. (sock_accept_nonblock): use s_accept_nonblock. (tcp_accept_nonblock): new method: TCPServer#accept_nonblock (unix_accept_nonblock): new method: UNIXServer#accept_nonblock git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10203 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-05-25* ruby.h, lib/mkmf.rb (create_header): clear command line options fornobu
macros moved to extconf.h. * ext/extmk.rb (extract_makefile, extmk): made RUBY_EXTCONF_H and EXTSTATIC permanent. * ext/{dbm,digest/*,socket,zlib}/extconf.rb: used $defs and $INCFLAGS. * {bcc32,win32,wince}/Makefile.sub (COMPILE_C, COMPILE_CXX): added $(INCFLAGS). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10193 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-05-24update nonblocking methods document.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10185 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-05-22add reason for accept(2) failure in accept_nonblock.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10181 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-05-22update *_nonblock doc.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10179 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-05-22* rubyio.h (rb_io_set_nonblock): declared.akr
* io.c (rb_io_set_nonblock): new function. (io_getpartial): nonblocking read support. (io_read_nonblock): new method: IO#read_nonblock. (io_write_nonblock): new method: IO#write_nonblock. * ext/socket/socket.c (s_accept): retry for EWOULDBLOCK. revert [ruby-talk:113807]. (sock_connect_nonblock): new method: Socket#connect_nonblock. (sock_accept_nonblock): new method: Socket#accept_nonblock. (sock_recvfrom_nonblock): new method: Socket#recvfrom_nonblock. [ruby-core:7917] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10172 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-03-03* ext/dl/.cvsignore: ignore callback.h.aamine
* ext/ripper/.cvsignore: ignore eventids2table.c. * ext/socket/.cvsignore: ignore constants.h. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10018 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-02-03* eval.c: unify ruby_class (for method definition) and ruby_cbasematz
(for constant reference). * eval.c (rb_call0): use TMP_ALLOC() instead of allocating a temporary array object. * eval.c (eval): need not to protect $SAFE value. [ruby-core:07177] * error.c (Init_Exception): change NameError to direct subclass of Exception so that default rescue do not handle it silently. * struct.c (rb_struct_select): update RDoc description. [ruby-core:7254] * numeric.c (int_upto): return an enumerator if no block is attached to the method. * numeric.c (int_downto): ditto. * numeric.c (int_dotimes): ditto. * enum.c (enum_first): new method Enumerable#first to take first n element from an enumerable. * enum.c (enum_group_by): new method Enumerable#group_by that groups enumerable values according to their block values. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9880 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-01-26* ext/socket/socket.c: turn on do_not_reverse_lookup by default.matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9858 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-11-28* ext/socket/socket.c (init_inetsock_internal): remove settingusa
SO_REUSEADDR option on server socket on Cygwin. fixed: [ruby-core:6765] ([ ruby-Bugs-2872 ]) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9627 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-11-28* ext/socket/socket.c (init_inetsock_internal): remove settingusa
SO_REUSEADDR option on server socket. fixed: [ruby-core:6765] ([ ruby-Bugs-2872 ]) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9626 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-11-18* ext/socket/socket.c: Socket Documentation. [ruby-core:6580]ocean
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9565 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-10-21* intern.h, struct.c (rb_struct_iv_get): constified.ocean
* marshal.c: avoid one VC++6 warning for implicit conversion from int to char. * ruby.h: ANSI styled. * bcc32/Makefile.sub (HAVE_HYPOT): added. * ext/socket/extconf.rb: BeOS is only one platform should call closesocket, so check __BEOS__ macro directly. (I was worried accidently HAVE_CLOSESOCKET is defined on windows again because it has it) * ext/socket/{getaddrinfo.c,socket.c}: ditto. ... these are all cosmetic changes. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9435 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-10-18* sorry, commit miss.usa
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9409 b2dd03c8-39d4-4d8f-98ff-823fe69b080e