summaryrefslogtreecommitdiff
path: root/io.c
AgeCommit message (Collapse)Author
2005-09-05document a blocking behavior of IO#eof?.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9084 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-08-30* array.c, dir.c, enum.c, hash.c, io.c, range.c, string.c, struct.c:nobu
let enumerable methods return Enumerator. [ruby-dev:26924] * intern.h (RETURN_ENUMERATOR): utility macro for enumerable methods. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9053 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-07-27* parse.y (lambda): Perl6 style -> lambda expression. [NEW]matz
[VERY EXPERIMENTAL] * gc.c (id2ref): must not assign pointers to long int. use LONG_LONG instead if SIZEOF_LONG < SIZEOF_VOIDP. [ruby-talk:149645] * ruby.h: use LONG_LONG to simplify the change. [ruby-talk:149645] * dir.c (dir_each): rewinddir(3) before iteration. [ruby-talk:149628] * eval.c (rb_f_throw): replace all '0x%lx' by '%p'. [ruby-talk:149553] * missing/vsnprintf.c (BSD_vfprintf): '%p' need to handle 64bit size pointer. [ruby-talk:149553] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8847 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-07-23* sprintf.c (rb_vsprintf, rb_sprintf): new functions return new String,nobu
using missing/vsnprintf.c. [ruby-dev:26580] * missing/vsnprintf.c: made the output changeable. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8825 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-07-20* io.c (S_ISREG): need to define S_ISREG before it is used first.usa
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8813 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-07-20fix previous commit.akr
don't use S_ISDIR. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8811 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-07-20* io.c (wsplit_p): patch for the environment whereocean
fcntl(F_GETFL, O_NONBLOCK) is not supported. in that case, set FMODE_WSPLIT without fcntl check. [ruby-dev:26566] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8810 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-07-20* io.c (rb_io_ctl): update FMODE_WSPLIT_INITIALIZED and FMODE_WSPLITakr
by F_SETFL. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8809 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-07-19* signal.c (trap): remove sigexit(); handle "EXIT" via sig_exec().matz
[ruby-dev:26440] * io.c (rb_io_inspect): replace sprintf() with "%s" format all over the place by snprintf() to avoid integer overflow. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8800 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-07-18* rubyio.h (FMODE_WSPLIT, FMODE_WSPLIT_INITIALIZED): new constant.akr
* io.c (wsplit_p): new function. (io_fflush): split writing data by PIPE_BUF if wsplit_p is true in multi-threaded mode. (io_fwrite): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8787 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-06-03* intern.h (rb_fdset_t): deal with fd bit sets over FD_SETSIZE.nobu
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
2005-03-07* object.c (inspect_obj): unintended space removal.matz
[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
2005-03-04* array.c: replace rb_protect_inspect() and rb_inspecting_p() bymatz
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
2005-02-07fix previous commit to check stdout is a tty.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7914 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-02-07* io.c (io_getc): flush rb_stdout before read fro stdin, which isakr
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
2005-01-25fix some documents.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7820 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-01-24fix IO#read docment.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7819 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-01-11* io.c (remain_size): use buffered data instead of unreading to avoidnobu
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
2005-01-09* io.c (rb_f_select): IO list could be altered. [ruby-dev:25312]nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7756 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-01-08update readpartial document.akr
don't try read timeout on Windows. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7752 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-01-01* io.c (argf_readpartial): new method ARGF.readpartial.akr
(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
2004-12-30* rubyio.h: don't deprecate rb_read_check.akr
* 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
2004-12-23* io.c (next_argv): reduce use of stdio.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7650 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-12-23* io.c (io_reopen, rb_io_reopen): prohibit to change access mode fornobu
special IO ports. [ruby-dev:25225] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7649 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-12-23* rubyio.h: rename FMODE_UNSEEKABLE to FMODE_DUPLEX.akr
* 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
2004-12-22* io.c (rb_io_mode_modenum): replace O_ACCMODE with O_RDWR.nobu
fixed: [ruby-dev:25273] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7632 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-12-09* io.c (pipe_open): should set prog if argc != 0.eban
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7518 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-12-08* rubyio.h, io.c, ext/dl/dl.c, ext/pty/pty.c, ext/socket/socket.c:akr
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
2004-12-07* io.c (pipe_open): win32 bidirectional pipe support.usa
* 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
2004-12-07* io.c (io_fwrite): avoid context switch before writing to stderr.akr
[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
2004-12-06* process.c (proc_setgroups): [ruby-dev:25081]matz
* 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
2004-12-06* configure.in (ac_cv_sizeof_rlim_t): setup for DJGPP.eban
* 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
2004-12-06* io.c (is_socket): fix typos. [ruby-core:03900]usa
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7479 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-12-06* io.c (is_socket): new function.usa
* 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
2004-12-06* rubyio.h, intern.h, io.c, file.c, process.c, ext/socket/socket.c,akr
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
2004-12-02* io.c (rb_file_initialize): [ruby-dev:25032]matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7440 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-12-02* io.c (rb_io_ctl): [ruby-dev:25019]matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7435 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-30* io.c (pipe_open): errno should be preserved for rb_sys_fail() whennobu
fork failed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7428 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-30* io.c (io_fread): need not to null terminate. [ruby-dev:24998]matz
* 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
2004-11-29* io.c (rb_io_sysread): use temporary lock. [ruby-dev:24992]matz
* 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
2004-11-29* object.c (convert_type): [ruby-core:03845]matz
* 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
2004-11-29* io.c (fptr_finalize): must not use FILE after fclose().nobu
[ruby-dev:24985] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7409 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-28don't use READ_DATA_PENDING in previous changeakr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7406 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-28* io.c (rb_io_check_writable): restrict io_seek byakr
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
2004-11-27io.c (rb_io_fwrite): set path to NULLakr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7395 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-27* io.c: avoid avoid data loss with nonblocking fd andakr
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
2004-11-27* io.c (io_fread): [ruby-dev:24964]matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7387 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-26* io.c (rb_io_initialize): [ruby-dev:24963]matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7385 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-26* io.c (rb_io_initialize): [ruby-dev:24962]matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7384 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-26* io.c (rb_io_initialize): should retrieve flags from copying filematz
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