summaryrefslogtreecommitdiff
path: root/process.c
AgeCommit message (Collapse)Author
2003-08-31* process.c (p_gid_sw_ensure): return VALUE.eban
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4471 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-08-31* process.c (p_gid_sw_ensure): lack of function typenagai
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4469 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-08-29* doc/ChangeLog-1.8.0: add changes of Ruby/Tknagai
* ext/tcltklib/tcltklib.c : some methods have no effect if on slave-IP * ext/tcltklib/tcltklib.c : can create a interpreter without Tk * ext/tcltklib/tcltklib.c : bug fix on handling exceptions * ext/tcltklib/MANUAL.euc : modify * ext/tk/lib/tk.rb : freeze some core modules * ext/tk/lib/multi-tk.rb : more secure * ext/tk/lib/tk.rb: TkVariable.new(array) --> treat the array as the Tk's list * ext/tk/lib/tk.rb: improve accessibility of TkVariable object * ext/tk/lib/tk.rb, ext/tk/lib/tkfont.rb, ext/tk/lib/tkcanvas.rb, ext/tk/lib/tktext.rb : fix bug of font handling * ext/tk/lib/tkfont.rb TkFont.new() accepts compound fonts * process.c: bug fix * process.c: add rb_secure(2) to methods of Process::{UID,GID,Sys} * process.c: deny handling IDs during evaluating the block given to the Process::{UID,GID}.switch method git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4456 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-08-03* modify macro to detect 'MacOS X' based on [ruby-talk:77849]nagai
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4293 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-08-01* (bug fix) preprocessor errors occur on OpenBSD-currentnagai
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4276 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-07-25* ext/socket/socket.c (tcp_s_gethostbyname): was usingmatz
uninitialized size_t value. [ruby-talk:76946] * Minor cleanups. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4156 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-07-24* gcc -Wall clean-up.matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4151 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-07-23process.c : unify indentationnagai
configure.in : add --enable-setreuid option tcltklib.c : TclTkIp.new accepts 'ip-name' and 'options' ( e.g. TclTkIp.new('FOO', '-geometry 500x200 -use 0x2200009') ) tk.rb : support arguments of TclTkIp.new ( see TkCore::IP_NAME, TkCore::IP_OPTS ) tk*.rb : preparations for multi-Tk interpreter support git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4127 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-07-23process.c, configure.in :nagai
* add a module for raw syscalls to control UID/GID * add modules for portable UID/GID control git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4119 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-07-15* lib/matrix.rb: remove elements conversion to_f, to_i, to_r.matz
* lib/cgi/session/pstore.rb: add new file. * process.c (proc_getgroups, proc_setmaxgroups): fix typo. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4072 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-06-10* lib/irb.rb (IRB::Irb::eval_input): warn and exit if $SAFE >=3matz
after input evaluation. * lib/irb.rb (IRB::Irb::eval_input): untaint input string. now irb works for levels 1 and 2. * ext/syck/rubyext.c (syck_loader_transfer): should not use rb_cProc directly, since type_proc may be Proc, Block, or Method. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3931 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-06-09* configure.in: checks presence of grp.h and setgroups().nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3921 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-06-09* process.c (proc_getgroups, proc_setgroups): raisenobu
NotImplementedError unless available. [ruby-talk:73014] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3920 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-06-07* parse.y (value_expr0): class and module statements should not bematz
warned for "void value expression". [ruby-talk:72989] * gc.c (add_final): should determine type by respond_to? * gc.c (define_final): ditto. * io.c (rb_io_ctl): should not depend on respond_to? * range.c (range_step): rb_check_string_type(). * process.c (proc_setgroups): new functions. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3918 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-03-20* eval.c (load_dyna): clear ruby_errinfo. (ruby-bugs-ja PR#409)matz
* io.c (read_all): make str empty if given. (ruby-bugs-ja PR#408) * io.c (io_read): ditto. * io.c (rb_io_sysread): ditto. * range.c: do not override min and max. * sprintf.c (remove_sign_bits): octal left most digit for negative numbers may be '3'. (ruby-bugs-ja PR#407) * sprintf.c (rb_f_sprintf): should prefix sign bits if bignum is negative, using sign_bits(). * eval.c (avalue_to_mrhs): split argument passing and assignment conversion. * eval.c (svalue_to_mrhs): ditto. * eval.c (avalue_to_svalue): avalue_to_svalue([[1,2]]) should be [[1,2]], not [1,2] to wrap-around. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3584 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-03-07* parse.y (dsym): :"symbol string" style should not contain `\0'.matz
* process.c (proc_detach): new method Proc#detach(pid) which create background watcher thread to issue waitpid. [new] * process.c (rb_detach_process): utility function to detach process from C code. * ext/pty/pty.c (pty_finalize_syswait): terminate watcher thread, and detach child process (by creating new idle waitpid watcher thread). * ext/pty/pty.c (pty_syswait): may lost signal stopped child. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3561 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-01-16Updated Copyrights of Matz to 2003.michal
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3345 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-01-07* hash.c (env_clear): new Hash compatible method.matz
* hash.c (env_shift): ditto. * hash.c (env_invert): ditto. * hash.c (env_replace): ditto. * hash.c (env_update): ditto. * array.c (rb_ary_join): dispatch based on "to_str". * array.c (rb_ary_times): ditto. * array.c (rb_ary_equal): ditto. * process.c (rb_f_exec): dispatch based on "to_ary". * eval.c (umethod_bind): exact class match is not required. relax the restriction to subclasses. * eval.c (rb_eval): call "inherited" before executing class body. * class.c (rb_define_class): call "inherited" after defining the constant. * class.c (rb_define_class_under): ditto. * eval.c (massign): expand first element if RHS is an array and its size is 1, and LHS has concrete assignment target (i.e. LHS has target(s) other than *var). * eval.c (massign): avoid unnecessary avalue/svalue conversion. * eval.c (rb_yield_0): ditto * array.c (rb_ary_update): do not allocate unused array if rpl is nil (i.e. merely removing elements). * io.c (io_read): should resize supplied string if it's shorter than expected. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3307 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-01-06* process.c (proc_exec_v): follow to proc_spawn_v(). call do_aspawn()usa
on Win32. * process.c (rb_proc_exec): call do_spawn() on Win32. * win32/win32.c, win32/win32.h (do_spawn, do_aspawn): add mode flag. * process.c (proc_spawn_v, rb_f_system): follow above change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3298 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-01-04* process.c (rb_proc_exec): use same logic as DJGPP on win32 ports.usa
* process.c (rb_f_system): ditto. * win32/win32.c, win32/win32.h (do_aspawn): [new]. for arrayed arguments. * win32/win32.c (CreateChild): add new argument for real filename of executing process. * win32/win32.c (NtHasRedirection, pipe_exec): follow above change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3283 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-01-03* process.c (rb_proc_times): need to initialize first.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3279 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-01-01* process.c (rb_proc_times): avoid WindowsXP crash using volatilematz
variables. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3274 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-12-31* Makefile.in, {win32,bcc32}/Makefile.sub: add new target:eban
what-where, no-install. * mkconfig.rb: add const: CROSS_COMPILING. * ext/extmk.rb: no-install support. add MAKEDIRS macro. * lib/mkmf.rb: add !ifdef .. !endif for Borland make. * process.c: improve DJGPP support. system "ls", "-l". git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3259 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-12-15* configure.in, defines.h, dir.c, dir.h, dln.c, error.c,uema2
eval.c, file.c, hash.c, io.c, main.c, missing.c, process.c, ruby.c, rubysig.h, signal.c, st.c, util.c, util.h, bcc/Makefile.sub, win32/Makefile.sub, win32/win32.h, ext/Win32API/Win32API.c, ext/socket/getaddrinfo.c, ext/socket/getnameinfo.c, ext/socket/socket.c, ext/tcltklib/stubs.c : replace "NT" with "_WIN32", add DOSISH_DRIVE_LETTER * wince/exe.mak : delete \r at the end of lines. * wince/mswince-ruby17.def : delete rb_obj_become git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3148 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-12-10* sprintf.c (rb_f_sprintf): preceding ".." for negative numbersmatz
still left; removed. * sprintf.c (rb_f_sprintf): should not prepend '0' if width > prec for example "%5.3d". * process.c (Init_process): add Process.exit and Process.abort * pack.c (utf8_to_uv): raise ArgumentError for malformed/redundant UTF-8 sequences. * process.c (last_status_set): add pid attribute to Process::Status. * pack.c (uv_to_utf8): limit maximum length of the encoded string to 6 bytes, even when the platform supports 8 bytes long integers. * pack.c (utf8_to_uv): do not decode sequences longer than 6 bytes. * object.c (copy_object): use "copy_object" method, not "become". git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3123 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-12-02WinCE patch mergedmatz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3106 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-17move struct timeval to missing.hmichal
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2873 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-08-28Int vs Long cleanup #3 (ruby-core:352)michal
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2754 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-08-21*.c: Int vs Long cleanupmichal
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2734 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-07-11* string.c (rb_str_slice_bang): if there's no correspondingmatz
substring, slice! should return nil without exception. * array.c (rb_ary_insert): type fixed. * string.c (rb_str_split_m): accept separator value nil as well. * string.c (rb_str_become): was leaking memory. * class.c (rb_include_module): should not alter other classes/modules by inclusion. by this fix, local order may not be preserved for some cases. * class.c (include_class_new): module may be T_ICLASS; retrieve original module information. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2632 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-05-14* eval.c (rb_clear_cache_by_class): new function.matz
* eval.c (set_method_visibility): should have clear cache forq updated visibility. * numeric.c (flo_to_s): default format precision to be "%.16g". * util.c (ruby_strtod): use own strtod(3) implementation to avoid locale hell. Due to this change "0xff".to_f no longer returns 255.0 * eval.c (avalue_to_yvalue): new function to distinguish yvalue (no-arg == Qundef) from svalue (no-arg == Qnil). * eval.c (rb_yield_0): use avalue_to_yvalue(). * eval.c (assign): warn if val == Qundef where it means rhs is void (e.g. yield without value or call without argument). * parse.y (value_expr): need not to warn for WHILE and UNTIL, since they can have return value (via valued break). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2457 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-03-22* the VMS support patch submitted by Akiyoshi, Masamichimatz
<Masamichi.Akiyoshi@jp.compaq.com> is merged. * 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/trunk@2258 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-03-11* marshal.c (w_object): module inclusion using extend() shouldmatz
also be detected. * eval.c (rb_eval_cmd): cbase should not be NULL; it should be either ruby_wrapper or Object. * enum.c (enum_each_with_index): should return self. * process.c (proc_setpgrp): should return value for non-void function. * process.c (proc_getpgid): should raise exception if getpgid() return -1. * string.c (rb_str_ljust): should return a duplicated string. * string.c (rb_str_rjust): ditto. * string.c (rb_str_center): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2172 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-02-26* eval.c (rb_eval): call trace_func for if/while conditions.matz
* marshal.c (r_object): separate r_regist from proc calling. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2139 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-02-25* eval.c (method_inspect): should not dump core for unboundmatz
singleton methods. * object.c (rb_mod_to_s): better description. * hash.c (env_select): should path the assoc list. * process.c (rb_syswait): thread kludge; should be fixed to support native thread. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2128 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-02-19* file.c (path_check_1): should check directory sticky bits.matz
* process.c (security): need not to warn twice. * marshal.c (r_object): complete restoration before calling r_regist(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2092 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-02-06* io.c (rb_io_readlines): avoid calling GetOpenFile() repeatedly.matz
* io.c (rb_io_each_line): ditto. * io.c (argf_getline): ditto. * process.c: should include <time.h> to get proper CLK_TCK. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2049 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-01-11* re.c (match_select): should propagate taintness.matz
* hash.c (rb_hash_set_default): Hash#default= should return the new value. * string.c (rb_str_to_i): accepts optional base argument. [new] * numeric.c (rb_fix2str): should not handle negative fixnum values int32 via calling sprintf() directly. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1985 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-01-04* process.c (rb_f_system): abandon vfork.matz
* io.c (pipe_open): ditto. * defines.h: sparc linux needs different FLUSH_REGISTER_WINDOWS * regex.c (re_search): abandon stclass optimization. * bignum.c (rb_cstr2inum): deny "0_". * bignum.c (rb_cstr2inum): allow "0\n" and so on. * error.c (rb_invalid_str): utility function to show inspect()'ed string. * bignum.c (rb_cstr2inum): prints invalid strings in inspect()'ed format. * object.c (rb_Float): ditto. * object.c (rb_convert_type): no longer use rb_rescue(). * re.c (rb_reg_search): initialize taint status of match object. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1959 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-11-21* parse.y (str_extend): should check nesting parentheses in #{}.matz
* process.c (pst_wstopsig): returns nil unless WIFSTOPPED() is non-zero. * process.c (pst_wtermsig): returns nil unless WIFSIGNALED() is non-zero. * process.c (pst_wexitstatus): returns nil unless WIFEXITED() is non-zero. * eval.c (rb_thread_select): tv_sec and tv_usec should not be negative. * signal.c (posix_signal): do not set SA_RESTART for SIGVTALRM. * parse.y (call_args2): block_arg may follow the first argument in call_args2. * eval.c (stack_check): should avoid stack length check during raising SystemStackError exception. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1852 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-11-19* parse.y (parse_regx): should raise error on untermitatedmatz
expression interpolation. * pack.c (pack_unpack): should give length to utf8_to_uv(). * pack.c (utf8_to_uv): add length check. * massages: replace "wrong #" by "wrong number". * marshal.c (w_float): output Infinity and NaN explicitly. * marshal.c (r_object): support new explicit float format. * eval.c (rb_thread_wait_for): select may cause ERESTART on Solaris. * eval.c (rb_thread_select): ditto. * array.c (rb_ary_join): dumped core if sep is not T_STRING nor T_NIL. * array.c (rb_ary_join): buffer size calculattion was wrong. * array.c (rb_ary_to_s): if rb_output_fs is nil, insert newlines between array elements (use rb_default_rs as newline litral) [experimental]. * gc.c (init_mark_stack): no need to clear mark_stack. * gc.c (gc_mark_all): need to handle finalizer mark. * gc.c (gc_mark_rest): use MEMCPY instead of memcpy. * gc.c (rb_gc_mark): earlier const check to avoid pusing special constants into mark stack. * numeric.c (fix_to_s): 'to_s' now takes optional argument to specify radix. [new] * bignum.c (rb_big_to_s): ditto. [new] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1842 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-11-08* process.c (security): always give warning for insecure PATH.matz
* dir.c (my_getcwd): do not rely on MAXPATHLEN. * file.c (rb_file_s_readlink): ditto. * file.c (path_check_1): ditto. * eval.c (rb_yield_0): should not call rb_f_block_given_p(). * string.c (rb_str_chomp_bang): should terminate string by NUL. * eval.c (rb_yield_0): better error message. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1816 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-10-09* process.c (Init_process): activate the case NT.eban
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1777 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-09-08* eval.c (rb_thread_restore_context): save current value ofmatz
lastline and lastmatch in the thread struct for later restore. * eval.c (rb_thread_save_context): restore lastline and lastmatch. * numeric.c (flo_to_s): should handle negative float value. * class.c (rb_include_module): should check whole ancestors to avoid duplicate module inclusion. * string.c (trnext): should check backslash before updating "now" position. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1746 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-08-06* string.c (rb_str_lstrip_bang): new method.matz
* string.c (rb_str_rstrip_bang): new method. * string.c (rb_str_associate): should consider STR_ASSOC too. * eval.c (rb_undefined): do not recurse if method_missing is undefined. * process.c (proc_waitpid): now all arguments are optional. * process.c (Init_process): waitpid is now alias to wait. * process.c (Init_process): waitpid2 is now alias to wait2. * process.c (rb_waitpid): made public. * ext/pty/pty.c (pty_getpty): avoid disturbing SIGCHLD using thread and rb_waitpid. * process.c (proc_getpgrp): now takes no argument on all platforms. * process.c (proc_setpgrp): ditto. * ext/socket/socket.c (sock_s_pack_sockaddr_in): added Socket::pack_sockaddr_in(). [new] * ext/socket/socket.c (sock_s_pack_sockaddr_un): added Socket::pack_sockaddr_un(). [new] * ext/socket/socket.c (sock_s_pack_sockaddr_in): added Socket::unpack_sockaddr_in(). [new] * ext/socket/socket.c (sock_s_pack_sockaddr_un): added Socket::unpack_sockaddr_un(). [new] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1666 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-07-31* process.c (last_status_set): nothing returned, should be void.nobu
* ext/socket/socket.c (load_addr_info): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1659 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-05-21* bignum.c (rb_big2str): t should be protected from GC.matz
* process.c (rb_proc_times): need not to check retrun value from times(2). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1438 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-05-16* array.c (rb_ary_and): should not push frozen key string.matz
* array.c (rb_ary_or): ditto. * eval.c (rb_thread_schedule): should save context before raising deadlock, saved context for current thread might be obsolete. * time.c (make_time_t): non DST timezone shift supported (hopefully). * time.c (make_time_t): strict range detection for negative time_t. * signal.c: SIGINFO added. * eval.c (rb_ensure): should not SEGV when prot_tag is NULL. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1399 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-05-02* eval.c (block_pass): should not downgrade safe level.matz
* ext/dbm/extconf.rb: allow specifying dbm-type explicitly. * ext/dbm/extconf.rb: avoid gdbm if possible, because it leaks memory, whereas gdbm.so doesn't. potential incompatibility. * string.c (rb_str_insert): new method. * parse.y (yylex): lex_state after RESCUE_MOD should be EXPR_BEG. * array.c (rb_ary_insert): new method. * array.c (rb_ary_update): new utility function. * io.c (set_outfile): should check if closed before assignment. * eval.c (rb_eval): should preserve value of ruby_errinfo. * eval.c (rb_thread_schedule): infinite sleep should not cause dead lock. * array.c (rb_ary_flatten_bang): proper recursive detection. * eval.c (yield_under): need not to prohibit at safe level 4. * pack.c (pack_pack): p/P packs nil into NULL. * pack.c (pack_unpack): p/P unpacks NULL into nil. * pack.c (pack_pack): size check for P template. * ruby.c (set_arg0): wrong predicate when new $0 value is bigger than original space. * gc.c (id2ref): should use NUM2ULONG() * object.c (rb_mod_const_get): check whether name is a class variable name. * object.c (rb_mod_const_set): ditto. * object.c (rb_mod_const_defined): ditto. * marshal.c (w_float): precision changed to "%.16g" * eval.c (rb_call0): wrong retry behavior. * numeric.c (fix_aref): a bug on long>int architecture. * eval.c (rb_eval_string_wrap): should restore ruby_wrapper. * regex.c (re_compile_pattern): char class at either edge of range should be invalid. * eval.c (handle_rescue): use === to compare exception match. * error.c (syserr_eqq): comparison between SytemCallErrors should based on their error numbers. * eval.c (safe_getter): should use INT2NUM(). * bignum.c (rb_big2long): 2**31 cannot fit in 31 bit long. * regex.c (calculate_must_string): wrong length calculation. * 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). * class.c (rb_singleton_class_attached): should modify iv_tbl by itself, no longer use rb_iv_set() to avoid freeze check error. * variable.c (rb_const_get): error message "uninitialized constant Foo at Bar::Baz" instead of "uninitialized constantBar::Baz::Foo". * eval.c (rb_mod_included): new hook called from rb_mod_include(). * io.c (opt_i_set): should strdup() inplace_edit string. * eval.c (exec_under): need to push cref too. * eval.c (rb_f_missing): raise NameError for "undefined local variable or method". * error.c (Init_Exception): new exception NoMethodError. NameError moved under ScriptError again. * eval.c (rb_f_missing): use NoMethodError instead of NameError. * file.c (Init_File): should redifine "new" class method. * eval.c (PUSH_CREF): sharing cref node was problematic. maintain runtime cref list instead. * eval.c (rb_eval): copy defn node before registering. * eval.c (rb_load): clear ruby_cref before loading. * variable.c (rb_const_get): no recursion to show full class path for modules. * eval.c (rb_set_safe_level): should set safe level in curr_thread as well. * eval.c (safe_setter): ditto. * object.c (rb_obj_is_instance_of): nil belongs to false, not true. * time.c (make_time_t): proper (I hope) daylight saving time handling for both US and Europe. I HATE DST! * eval.c (rb_thread_wait_for): non blocked signal interrupt should stop the interval. * eval.c (proc_eq): class check aded. * eval.c (proc_eq): typo fixed ("return" was ommitted). * error.c (Init_Exception): move NameError under StandardError. * class.c (rb_mod_clone): should copy method bodies too. * bignum.c (bigdivrem): should trim trailing zero bdigits of remainder, even if dd == 0. * file.c (check3rdbyte): safe string check moved here. * time.c (make_time_t): remove HAVE_TM_ZONE code since it sometimes reports wrong time. * time.c (make_time_t): remove unnecessary range check for platforms where negative time_t is available. * process.c (proc_waitall): should push Process::Status instead of Finuxm status. * process.c (waitall_each): should add all entries in pid_tbl. these changes are inspired by Koji Arai. Thanks. * process.c (proc_wait): should not iterate if pid_tbl is 0. * process.c (proc_waitall): ditto. * numeric.c (flodivmod): a bug in no fmod case. * process.c (pst_wifsignaled): should apply WIFSIGNALED for status (int), not st (VALUE). * io.c (Init_IO): value of $/ and $\ are no longer restricted to strings. type checks are done on demand. * class.c (rb_include_module): module inclusion should be check taints. * ruby.h (STR2CSTR): replace to StringType() and StringTypePtr(). * ruby.h (rb_str2cstr): ditto. * eval.c (rb_load): should not copy topleve local variables. It cause variable/method ambiguity. Thanks to L. Peter Deutsch. * class.c (rb_include_module): freeze check at first. * eval.c (rb_attr): sprintf() and rb_intern() moved into conditional body. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1356 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-03-28* object.c (rb_str2cstr): warn if string contains \0 and lengthmatz
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. * ruby.h: all Check_SafeStr()'s are replaced by SafeStr() to ensure 'to_str' be always effective. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1288 b2dd03c8-39d4-4d8f-98ff-823fe69b080e