aboutsummaryrefslogtreecommitdiffstats
path: root/io.c
Commit message (Collapse)AuthorAgeFilesLines
* * intern.h (rb_fdset_t): deal with fd bit sets over FD_SETSIZE.nobu2005-06-031-50/+129
| | | | | | | | | | | | | | | | fixed: [ruby-dev:26187] * eval.c (rb_fd_init, rb_fd_term, rb_fd_zero, rb_fd_set, rb_fd_clr, rb_fd_isset, rb_fd_copy): ditto. * io.c (rb_io_wait_readable, rb_io_wait_writable, rb_f_select): ditto. * ext/io/wait/wait.c (io_wait): ditto. * ext/socket/socket.c (wait_connectable, unix_recv_io): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8552 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * object.c (inspect_obj): unintended space removal.matz2005-03-071-3/+0
| | | | | | | | | | | | | [ruby-dev:25810] * eval.c (rb_exec_recursive): should not use NODE in disclosed context. [ruby-dev:25812] * io.c (rb_f_open): need not to check if to_open value is a T_FILE. [ruby-dev:25812] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8098 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * array.c: replace rb_protect_inspect() and rb_inspecting_p() bymatz2005-03-041-29/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | rb_exec_recursive() in eval.c. * eval.c (rb_exec_recursive): new function. * array.c (rb_ary_join): use rb_exec_recursive(). * array.c (rb_ary_inspect, rb_ary_hash): ditto. * file.c (rb_file_join): ditto. * hash.c (rb_hash_inspect, rb_hash_to_s, rb_hash_hash): ditto. * io.c (rb_io_puts): ditto. * object.c (rb_obj_inspect): ditto * struct.c (rb_struct_inspect): ditto. * lib/set.rb (SortedSet::setup): a hack to shut up warning. [ruby-talk:132866] * lib/time.rb (Time::strptime): add new function. inspired by [ruby-talk:132815]. * lib/parsedate.rb (ParseDate::strptime): ditto. * regparse.c: move st_*_strend() functions from st.c. fixed some potential memory leaks. * exception error messages updated. [ruby-core:04497] * ext/socket/socket.c (Init_socket): add bunch of Socket constants. Patch from Sam Roberts <sroberts@uniserve.com>. [ruby-core:04409] * array.c (rb_ary_s_create): no need for negative argc check. [ruby-core:04463] * array.c (rb_ary_unshift_m): ditto. * lib/xmlrpc/parser.rb (XMLRPC::FaultException): make it subclass of StandardError class, not Exception class. [ruby-core:04429] * parse.y (fcall_gen): lvar(arg) will be evaluated as lvar.call(arg) when lvar is a defined local variable. [new] * object.c (rb_class_initialize): call inherited method before calling initializing block. * eval.c (rb_thread_start_1): initialize newly pushed frame. * lib/open3.rb (Open3::popen3): $? should not be EXIT_FAILURE. fixed: [ruby-core:04444] * eval.c (is_defined): NODE_IASGN is an assignment. * ext/readline/readline.c (Readline.readline): use rl_outstream and rl_instream. [ruby-dev:25699] * ext/etc/etc.c (Init_etc): sGroup needs HAVE_ST_GR_PASSWD check [ruby-dev:25675] * misc/ruby-mode.el: [ruby-core:04415] * lib/rdoc/generators/html_generator.rb: [ruby-core:04412] * lib/rdoc/generators/ri_generator.rb: ditto. * struct.c (make_struct): fixed: [ruby-core:04402] * ext/curses/curses.c (window_color_set): [ruby-core:04393] * ext/socket/socket.c (Init_socket): SO_REUSEPORT added. [ruby-talk:130092] * object.c: [ruby-doc:818] * parse.y (open_args): fix too verbose warnings for the space before argument parentheses. [ruby-dev:25492] * parse.y (parser_yylex): ditto. * parse.y (parser_yylex): the first expression in the parentheses should not be a command. [ruby-dev:25492] * lib/irb/context.rb (IRB::Context::initialize): [ruby-core:04330] * object.c (Init_Object): remove Object#type. [ruby-core:04335] * st.c (st_foreach): report success/failure by return value. [ruby-Bugs-1396] * parse.y: forgot to initialize parser struct. [ruby-dev:25492] * parse.y (parser_yylex): no tLABEL on EXPR_BEG. [ruby-talk:127711] * document updates - [ruby-core:04296], [ruby-core:04301], [ruby-core:04302], [ruby-core:04307] * dir.c (rb_push_glob): should work for NUL delimited patterns. * dir.c (rb_glob2): should aware of offset in the pattern. * string.c (rb_str_new4): should propagate taintedness. * env.h: rename member names in struct FRAME; last_func -> callee, orig_func -> this_func, last_class -> this_class. * struct.c (rb_struct_set): use original method name, not callee name, to retrieve member slot. [ruby-core:04268] * time.c (time_strftime): protect from format modification from GC finalizers. * object.c (Init_Object): remove rb_obj_id_obsolete() * eval.c (rb_mod_define_method): incomplete subclass check. [ruby-dev:25464] * gc.c (rb_data_object_alloc): klass may be NULL. [ruby-list:40498] * bignum.c (rb_big_rand): should return positive random number. [ruby-dev:25401] * bignum.c (rb_big_rand): do not use rb_big_modulo to generate random bignums. [ruby-dev:25396] * variable.c (rb_autoload): [ruby-dev:25373] * eval.c (svalue_to_avalue): [ruby-dev:25366] * string.c (rb_str_justify): [ruby-dev:25367] * io.c (rb_f_select): [ruby-dev:25312] * ext/socket/socket.c (sock_s_getservbyport): [ruby-talk:124072] * struct.c (make_struct): [ruby-dev:25249] * dir.c (dir_open_dir): new function. [ruby-dev:25242] * io.c (rb_f_open): add type check for return value from to_open. * lib/pstore.rb (PStore#transaction): Use the empty content when a file is not found. [ruby-dev:24561] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8068 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix previous commit to check stdout is a tty.akr2005-02-071-2/+7
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7914 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (io_getc): flush rb_stdout before read fro stdin, which isakr2005-02-071-6/+7
| | | | | | | | | connected to a tty. [ruby-core:4378] * rubyio.h (FMODE_TTY): renamed from FMODE_LINEBUF. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7913 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix some documents.akr2005-01-251-11/+10
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7820 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix IO#read docment.akr2005-01-241-5/+13
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7819 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (remain_size): use buffered data instead of unreading to avoidnobu2005-01-111-3/+7
| | | | | | | inconsistency of text mode. fixed: [ruby-dev:25446] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7767 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (rb_f_select): IO list could be altered. [ruby-dev:25312]nobu2005-01-091-3/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7756 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* update readpartial document.akr2005-01-081-6/+6
| | | | | | | don't try read timeout on Windows. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7752 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (argf_readpartial): new method ARGF.readpartial.akr2005-01-011-49/+105
| | | | | | | | (io_getpartial): extracted from io_readpartial. (io_readpartial): call io_getpartial. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7703 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * rubyio.h: don't deprecate rb_read_check.akr2004-12-301-12/+25
| | | | | | | | | | | * io.c (STDIO_READ_DATA_PENDING): reverted from old READ_DATA_PENDING to check stdio read buffer. (rb_read_check): use STDIO_READ_DATA_PENDING. (rb_read_pending): ditto. (rb_getc): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7689 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (next_argv): reduce use of stdio.nobu2004-12-231-25/+37
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7650 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (io_reopen, rb_io_reopen): prohibit to change access mode fornobu2004-12-231-28/+34
| | | | | | | special IO ports. [ruby-dev:25225] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7649 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * rubyio.h: rename FMODE_UNSEEKABLE to FMODE_DUPLEX.akr2004-12-231-13/+15
| | | | | | | | * io.c (io_check_tty): extracted function to set FMODE_LINEBUF and FMODE_DUPLEX. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7641 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (rb_io_mode_modenum): replace O_ACCMODE with O_RDWR.nobu2004-12-221-1/+5
| | | | | | | fixed: [ruby-dev:25273] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7632 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (pipe_open): should set prog if argc != 0.eban2004-12-091-1/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7518 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * rubyio.h, io.c, ext/dl/dl.c, ext/pty/pty.c, ext/socket/socket.c:akr2004-12-081-89/+80
| | | | | | | | | | create FILE object only when required: popen(3) and DL's IO#to_ptr. [ruby-dev:25122] * io.c (rb_io_binmode): use setmode for Human68k. [ruby-dev:25121] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7510 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (pipe_open): win32 bidirectional pipe support.usa2004-12-071-6/+5
| | | | | | | | | | | | * win32/win32.[ch] (rb_w32_pipe_exec): ditto. * win32/win32.[ch] (socketpair): new function. POSIX socketpair emulation. * win32/win32.c (socketpair_internal): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7493 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (io_fwrite): avoid context switch before writing to stderr.akr2004-12-071-8/+4
| | | | | | | | | | | [ruby-dev:25080] * rubyio.h: refine deprecated declaration. * configure.in, file.c, io.c: remove useless check: fseeko, etc. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7490 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * process.c (proc_setgroups): [ruby-dev:25081]matz2004-12-061-31/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * re.c (rb_reg_eqq): document fix. [ruby-talk:122541] * io.c (io_fread): take VALUE argument. * ext/socket/socket.c (sock_connect): use rb_str_new4(). [ruby-dev:25052] * eval.c (rb_yield_0): [ruby-dev:25051] * io.c (io_write): remove rb_str_locktmp(). [ruby-dev:25050] * io.c (io_fwrite): takes VALUE string as an argument. [ruby-dev:25050] * ext/socket/socket.c (sock_connect): remove rb_str_locktmp(). [ruby-dev:25050] * ext/socket/socket.c (udp_connect): [ruby-dev:25045] * ext/socket/socket.c (udp_bind): ditto. * ext/socket/socket.c (udp_send): ditto. * ext/socket/socket.c (bsock_send): ditto. * ext/socket/socket.c (s_recvfrom): ditto. * hash.c (rb_hash_hash): should provide "hash" method where "eql?" is redefined. [ruby-talk:122482] * ext/socket/socket.c (bsock_setsockopt): [ruby-dev:25039] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7482 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * configure.in (ac_cv_sizeof_rlim_t): setup for DJGPP.eban2004-12-061-1/+4
| | | | | | | | | * io.c (is_socket, shutdown): define dummy macros for DJGPP. * process.c: use SIZEOF_RLIM_T instead of HAVE_RLIM_T for DJGPP. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7480 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (is_socket): fix typos. [ruby-core:03900]usa2004-12-061-6/+8
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7479 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (is_socket): new function.usa2004-12-061-13/+36
| | | | | | | | | | | | | | | | | * io.c (rb_io_close_read, rb_io_close_write): use is_socket(). * io.c (rb_io_fptr_finalize): need to check fptr->f before calling rb_io_fptr_cleanup(). * io.c (pipe_open): win32 pipe support (experimental). * win32/win32.[ch] (rb_w32_pipe_exec): return file descripters instead of FILE structure. * win32/win32.[ch] (rb_w32_is_socket): new function. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7477 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * rubyio.h, intern.h, io.c, file.c, process.c, ext/socket/socket.c,akr2004-12-061-517/+412
| | | | | | | | | | | ext/pty/pty.c, ext/io/wait/wait.c, ext/openssl/ossl_ssl.c: Use own buffering mechanism instead of stdio. * io.c, ext/stringio/stringio.c, test/ruby/ut_eof.rb: EOF flag removed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7473 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (rb_file_initialize): [ruby-dev:25032]matz2004-12-021-3/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7440 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (rb_io_ctl): [ruby-dev:25019]matz2004-12-021-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7435 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (pipe_open): errno should be preserved for rb_sys_fail() whennobu2004-11-301-0/+2
| | | | | | | fork failed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7428 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (io_fread): need not to null terminate. [ruby-dev:24998]matz2004-11-301-8/+6
| | | | | | | | | | | | * io.c (read_all): remove unnecessary rb_str_resize(). [ruby-dev:24996] * io.c (io_readpartial): ditto. * io.c (io_read): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7425 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (rb_io_sysread): use temporary lock. [ruby-dev:24992]matz2004-11-291-1/+7
| | | | | | | | | | * lib/ostruct.rb (OpenStruct::method_missing): check method duplication for -d. * lib/ostruct.rb (OpenStruct::initialize): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7419 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * object.c (convert_type): [ruby-core:03845]matz2004-11-291-5/+5
| | | | | | | | | | | | | | | * eval.c (rb_funcall_rescue): new function. * object.c (rb_Array): avoid using rb_respond_to(). * object.c (rb_Integer): ditto. * eval.c (get_backtrace): no conversion for nil. * parse.y (reduce_nodes): empty body should return nil. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7413 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (fptr_finalize): must not use FILE after fclose().nobu2004-11-291-5/+12
| | | | | | | [ruby-dev:24985] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7409 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* don't use READ_DATA_PENDING in previous changeakr2004-11-281-2/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7406 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (rb_io_check_writable): restrict io_seek byakr2004-11-281-3/+2
| | | | | | | | | READ_DATA_PENDING because io_seek(fptr, 0, SEEK_CUR) is meaningful only if read buffer is not empty. call io_seek regardless of NEED_IO_SEEK_BETWEEN_RW. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7404 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* io.c (rb_io_fwrite): set path to NULLakr2004-11-271-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7395 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c: avoid avoid data loss with nonblocking fd andakr2004-11-271-13/+40
| | | | | | | | | | | | stdio buffering in sync mode. [ruby-dev:24966] based on matz's patch [ruby-dev:24967] (io_fwrite): new primitive writing function which writes directly if sync mode. (rb_io_fwrite): wrapper for io_fwrite now. (io_write): call io_fwrite instead of rb_io_fwrite. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7392 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (io_fread): [ruby-dev:24964]matz2004-11-271-10/+25
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7387 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (rb_io_initialize): [ruby-dev:24963]matz2004-11-261-17/+13
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7385 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (rb_io_initialize): [ruby-dev:24962]matz2004-11-261-10/+10
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7384 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (rb_io_initialize): should retrieve flags from copying filematz2004-11-261-5/+7
| | | | | | | | | | | | descriptor. [ruby-dev:24961] * eval.c (method_missing): raise TypeError for classes do not have allocators. [ruby-core:03752] * lib/erb.rb: [ruby-core:03786] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7382 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (io_read): move StringValue() check before GetOpenFile().matz2004-11-251-1/+1
| | | | | | | [ruby-dev:24959] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7376 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * configure.in: AC_PREREQ(2.53) [ruby-core:03800]matz2004-11-251-2/+4
| | | | | | | * io.c (read_all): [ruby-dev:24955] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7369 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (io_read): [ruby-dev:24952]matz2004-11-231-58/+53
| | | | | | | * configure.in, io.c: cancel [ ruby-Patches-1074 ]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7361 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (io_read): [ruby-dev:24952]matz2004-11-231-6/+8
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7359 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (rb_io_getline): f.gets("") did not work. [ruby-core:03771]aamine2004-11-201-4/+8
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7342 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (__fpending): commit miss.eban2004-11-201-0/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7337 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (io_reopen): work around problem with Cygwin fseekoeban2004-11-201-3/+4
| | | | | | | returning ESPIPE. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7335 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * string.c (str_gsub): internal buffer should not be listed bymatz2004-11-191-0/+3
| | | | | | | | | | | ObjectSpace.each_object() by String#gsub. [ruby-dev:24931] * lib/cgi/session.rb (CGI::Session::FileStore::initialize): raise exception if data corresponding to session specified from the client does not exist. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7326 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c, rubyio.h (rb_io_modenum_flags): exported.nobu2004-11-181-1/+1
| | | | | | | | * ext/stringio/stringio.c (strio_initialize): allow Fixnum as mode as well as IO.new does. [ruby-dev:24896] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7304 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * dir.c (rb_glob2): do not allocate buffer from heap to avoidmatz2004-11-101-0/+5
| | | | | | | | | | | | | | | memory leaks. use string object for buffering instead. [ruby-dev:24738] * dir.c (join_path): ditto. * io.c (io_read): external input buffer may be modified even after rb_str_locktmp(). [ruby-dev:24735] * dir.c (fnmatch): p or s may be NULL. [ruby-dev:24749] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7242 b2dd03c8-39d4-4d8f-98ff-823fe69b080e