summaryrefslogtreecommitdiff
path: root/io.c
Commit message (Collapse)AuthorAgeFilesLines
* * io.c (argf_to_io): should prefetch argv.matz2003-02-211-0/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@3525 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (argf_getline): should not increment lineno at EOF.matz2003-02-041-3/+4
| | | | | | | * error.c (set_syserr): should preserve duplicated error names. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@3439 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (next_argv): not always set binmode.nobu2003-01-131-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@3338 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (next_argv): inherit binmode from $defout.eban2003-01-121-0/+7
| | | | | | | | * configure.in: better DJGPP support. add GNUmakefile. * djgpp/GNUmakefile: new. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@3333 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * configure.in (RUBY_CHECK_IO_NEED): added more tests.nobu2003-01-101-1/+5
| | | | | | | * io.c (rb_io_check_readable): seek after synchronized write. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@3327 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* also rb_io_putc().nobu2003-01-091-0/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@3323 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (io_write): set FMODE_WBUF flag unless flushed.nobu2003-01-091-0/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@3322 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * configure.in (RUBY_CHECK_IO_NEED): check whether fseek() andnobu2003-01-091-13/+45
| | | | | | | | | | | | | | | | | | fflush() are needed. * io.c (flush_before_seek): flush before seek if buffered data may remain. * io.c (rb_io_check_readable): seek if the last operation was write. * io.c (rb_io_check_writable): seek if the last operation was read. * rubyio.h (FMODE_RBUF, FMODE_WBUF): added. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@3317 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * dln.c (init_funcname): get rid of gcc-3 -O3 warning.nobu2002-12-311-2/+2
| | | | | | | | | | | | | | | | | | | | | * eval.c (copy_node_scope): ditto. * error.c (err_snprintf): ditto. * file.c (rb_file_s_chmod): ditto. * hash.c (delete_if_i, each_value_i, each_key_i, each_pair_i, envix): ditto. * io.c (rb_sysopen, rb_file_sysopen_internal): ditto. * process.c (security): ditto. * ext/socket/socket.c (tcp_s_gethostbyname, ip_s_getaddress): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@3261 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (io_fread): return value was longer when EWOULDBLOCKnobu2002-08-011-4/+5
| | | | | | | occurred. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@2678 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (rb_io_clone): writing stream was not copied properly.nobu2002-05-201-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@2473 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (blk_orphan): the wrong condition; backported from 1.7matz2002-05-141-2/+2
| | | | | | | | | | | | * eval.c (rb_clear_cache_by_class): new function. * eval.c (set_method_visibility): should have clear cache forq updated visibility. * re.c (rb_reg_s_quote): # also should be quoted. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@2455 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * file.c (rb_find_file): load must be done from an abolute path ifmatz2002-05-011-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | $SAFE >= 4. * re.c (rb_reg_s_quote): quote whitespaces for /x cases. * eval.c (rb_thread_cleanup): should not terminate main_thread by Fatal error. * regex.c (is_in_list): need to not exclude NUL and NEWLINE. * re.c (rb_reg_expr_str): wrong backslash escapement. * re.c (rb_reg_expr_str): do not escape embedded space characters. * eval.c (rb_thread_cleanup): current thread may be THREAD_STOPPED, for example when terminated from signal handler. * re.c (rb_reg_expr_str): should treat backslash specially in escaping. * bignum.c (rb_big_eq): check `y == x' if y is neither Fixnum, Bignum, nor Float. * pack.c (pack_unpack): should treat 'U' in character unit, not in byte unit. * marshal.c (w_uclass): should check based on rb_obj_class(), not CLASS_OF(). * io.c (io_write): check error if written data is less than specified size to detect EPIPE. * eval.c (assign): ruby_verbose should be surrounded by RTEST(). * object.c (rb_str2cstr): ditto. * parse.y (void_expr): ditto. * parse.y (void_stmts): ditto. * variable.c (rb_ivar_get): ditto. * variable.c (rb_cvar_set): ditto. * variable.c (rb_cvar_get): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@2419 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (read_all): return "" if file.size == 0.eban2002-04-111-2/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@2362 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (READ_DATA_PENDING): uClibc 0.9.10 support.eban2002-03-271-5/+3
| | | | | | | use !feof(fp) for default behavior. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@2295 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/socket/socket.c (bsock_do_not_rev_lookup_set): should not bematz2002-03-251-9/+3
| | | | | | | | | | | | | | | | | | allowed when $SAFE > 3. * dir.c (fnmatch): "*/bar" (with FNM_PATHNAME flag) does not match "foo/bar". * io.c (read_all): files on /proc filesystem with zero stat size, may have contents. * eval.c (exec_under): changing ruby_class is OK, but should not alter cbase. * eval.c (yield_under_i): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@2270 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (READ_DATA_PENDING): uClibc support.eban2002-02-271-0/+2
| | | | | | | | * random.c (rand_init): ditto. * ext/socket/{addinfo.h,getaddrinfo.c} (gai_strerror): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@2143 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * intern.h: prototypes; rb_io_addstr(), rb_io_printf(),nobu2002-02-201-6/+4
| | | | | | | | | | | | | | | rb_io_print(), rb_io_puts() * io.c (rb_io_addstr): make extern. * io.c (rb_io_printf): ditto. * io.c (rb_io_print): ditto. * io.c (rb_io_puts): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@2104 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (rb_io_ungetc): don't fail pushed EOF back.nobu2002-02-191-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@2086 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (ruby_stop): should not trace error handler.matz2002-01-211-4/+5
| | | | | | | | | * io.c (io_write): should not raise exception on O_NONBLOCK io. * dir.c (dir_set_pos): seek should return dir, pos= should not. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@2008 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* forgot to commit everything bug ChangeLogmatz2002-01-041-4/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1960 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * variable.c (rb_cvar_set): add frozen class/module check.matz2001-12-211-1/+1
| | | | | | | | | | | * variable.c (rb_cvar_declare): add frozen class/module check. * re.c (match_to_a): should propagate taint. * re.c (rb_reg_s_quote): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1932 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_thread_schedule): should not select a thread which ismatz2001-12-181-10/+9
| | | | | | | | | | | | | | | | | | | not yet initialized. * variable.c (find_class_path): should initialize iv_tbl if it's NULL. * class.c (rb_define_class): should return the existing class if the class is already defined and its superclass is ideintical to the specified superclass. * class.c (rb_define_class_under): ditto. * class.c (rb_define_module): should return the existing module if the module is already defined. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1917 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * intern.h: add prototypes.nobu2001-12-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | rb_str_dup_frozen() * ruby.h: added declaration. rb_defout, rb_stdin, rb_stdout, rb_stderr, ruby_errinfo * rubyio.h: changed double include guard macro to RUBYIO_H. * array.c (inspect_call): make static. * eval.c (dvar_asgn): ditto. * io.c (rb_io_close_read): ditto. * lex.c (rb_reserved_word): ditto. * ruby.c: (req_list_head, req_list_last): ditto. * ruby.c (require_libraries): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1916 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (io_fread): EAGAIN/EWOULDBLOCK should not terminate andmatz2001-12-041-0/+4
| | | | | | | | | | | | | throw away the input. * time.c (time_new_internal): underflow adjustment must not use negative div/mod. * time.c (time_cmp): should consider tv_usec on non Fixnum number comparison. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1884 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ruby.c (proc_options): should not adjust argc/argv if -e optionmatz2001-09-051-1/+1
| | | | | | | is supplied. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1726 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (rb_io_popen): accept integer flags as mode.matz2001-09-031-0/+3
| | | | | | | | | | | | | | | | | | * file.c (rb_find_file_ext): extension table can be supplied from outside. renamed. * eval.c (rb_f_require): replace rb_find_file_noext by rb_find_file_ext. * eval.c (rb_provided): should also check feature without extension. * numeric.c (flo_to_s): do not rely on decimal point to be '.' * parse.y (yylex): ternary ? can be followed by newline. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1720 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_f_require): searches ".rb" and ".so" at the samematz2001-06-191-2/+7
| | | | | | | | | | | | | | | | | | time. previous behavior (search ".rb", then ".so") has a security risk (ruby-bugs#PR140). * regex.c (re_compile_pattern): avoid pushing unnecessary option_set. * eval.c (rb_load): tainted string is OK if wrapped *and* $SAFE >= 4. * eval.c (rb_thread_start_0): should not nail down higher blocks before preserving original context (i.e. should not alter original context). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1527 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_add_method): should not call rb_secure(), formatz2001-06-051-0/+3
| | | | | | | | | | last_func may not be set. * io.c (rb_io_ctl): ioctl should accept any integer within C long range. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1503 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (safe_getter): should use INT2NUM().matz2001-04-171-2/+8
| | | | | | | * bignum.c (rb_big2long): 2**31 cannot fit in 31 bit long. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1323 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * regex.c (calculate_must_string): wrong length calculation.matz2001-04-161-0/+13
| | | | | | | | | | | | | | | | | | | | * eval.c (rb_thread_start_0): fixed memory leak. * parse.y (none): should clear cmdarg_stack too. * io.c (rb_fopen): use setvbuf() to avoid recursive malloc() on some platforms. * file.c (rb_stat_dev): device functions should honor stat field types (except long long such as dev_t). * eval.c (rb_mod_nesting): should not push nil for nesting array. * eval.c (rb_mod_s_constants): should not search array by rb_mod_const_at() for nil (happens for singleton class). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1320 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (opt_i_set): should strdup() inplace_edit string.matz2001-04-101-1/+2
| | | | | | | * eval.c (exec_under): need to push cref too. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1316 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * object.c (rb_str2cstr): warn if string contains \0 and lengthmatz2001-03-281-0/+2
| | | | | | | | | | | | | value is ignored. * class.c (rb_singleton_class_clone): should copy class constant table as well. * class.c (rb_include_module): sometimes cache was mistakenly left uncleared - based on the patch by K.Kosako. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1289 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (argf_seek): wrong calling sequence of rb_io_seek().matz2001-03-131-4/+5
| | | | | | | | | * parse.y (stmt): while/until modifier must work for empty body. * ruby.c (ruby_set_argv): clear ARGV contents before adding args. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1242 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (set_outfile): f should be the FILE* from the assigning value.matz2001-02-161-2/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1193 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Sun Jan 14 21:49:28 2001 Koji Arai <JCA02266@nifty.ne.jp>matz2001-01-151-1/+1
| | | | | | | | * sprintf.c (rb_f_sprintf): simple typo. binary base should be 2, not '2'. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1128 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* matzmatz2000-12-281-0/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1083 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* matzmatz2000-12-221-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1068 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* matzmatz2000-12-121-6/+14
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1061 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* matzmatz2000-11-271-18/+32
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1053 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* matzmatz2000-11-201-3/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1049 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* matzmatz2000-11-171-4/+6
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1043 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* 001117matz2000-11-161-14/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1042 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ebaneban2000-11-131-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1038 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* matzmatz2000-11-131-0/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1037 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* matzmatz2000-11-101-0/+9
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1033 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* matzmatz2000-11-081-8/+31
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1031 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* matzmatz2000-09-211-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@952 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* matzmatz2000-09-041-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@927 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* matzmatz2000-08-301-0/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@912 b2dd03c8-39d4-4d8f-98ff-823fe69b080e