summaryrefslogtreecommitdiff
path: root/eval.c
AgeCommit message (Collapse)Author
2003-12-05* eval.c (rb_exec_end_proc): maintain tmp_end_procs.matz
[ruby-dev:22154] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5119 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-05* eval.c (rb_exec_end_proc): should not clear end_procs andmatz
ephemeral_end_procs before execution. [ruby-dev:22144] * eval.c (rb_obj_extend): call Module#extended hook after extended_object. [ruby-list:38866] * object.c (Init_Object): Module#extended defined. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5118 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-04* dln.c (aix_loaderror): should not use member named 'errno' whichmatz
might be a macro (e.g. on AIX). * io.c (read_all): do not depend on lseek position. [ruby-dev:22026] * eval.c (rb_eval): preserve $! value when retry happens in the rescue clause. [ruby-talk:86697] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5113 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-11-27* eval.c (method_arity): used wrong Proc object. [ruby-talk:86504]nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5043 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-11-27* eval.c (rb_f_exit), process.c (rb_f_exit_bang): use VALUEs not butnobu
TYPEs. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5041 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-11-27* eval.c (rb_f_exit), process.c (rb_f_exit_bang): treat true asnobu
success, false as failure. [ruby-dev:22067] * eval.c (rb_f_abort, rb_thread_switch), process.c (rb_f_system): use ANSI macro instead of hard coded value. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5040 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-11-27* eval.c, gc.c: FreeBSD/ia64 currently does not have a way for aknu
process to get the base address for the RSE backing store, so hardcode it for the moment. [submitted by: Marcel Moolenaar <marcel@FreeBSD.org>] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5039 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-11-22* gc.c (Init_stack): stack region is far smaller than usual ifmatz
pthread is used. * marshal.c (w_extended): singleton methods should not be checked when dumping via marshal_dump() or _dump(). [ruby-talk:85909] * file.c (getcwdofdrv): avoid using getcwd() directly, use my_getcwd() instead. * merged NeXT, OpenStep, Rhapsody ports patch from Eric Sunshine <sunshine@sunshineco.com>. [ruby-core:01596] * marshal.c (w_object): LINK check earlier than anything else, i.e. do not dump TYPE_IVAR for already dumped objects. (ruby-bugs PR#1220) * eval.c (rb_eval): call "inherited" only when a new class is generated; not on reopening. * eval.c (eval): prepend error position in evaluating string to * configure.in: revived NextStep, OpenStep, and Rhapsody ports which had become unbuildable; enhanced --enable-fat-binary option so that it accepts a list of desired architectures (rather than assuming a fixed list), or defaults to a platform-appropriate list if user does not provide an explicit list; made the default list of architectures for MAB (fat binary) more comprehensive; now uses -fno-common even when building the interpreter (in addition to using it for extensions), thus allowing the interpreter to be embedded into a plugin module of an external project (in addition to allowing embedding directly into an application); added checks for <netinet/in_systm.h> (needed by `socket' extension) and getcwd(); now ensures that -I/usr/local/include is employed when extensions' extconf.rb scripts invoke have_header() since extension checks on NextStep and OpenStep will fail without it if the desired resource resides in the /usr/local tree; fixed formatting of --help message. * Makefile.in: $(LIBRUBY_A) rule now deletes the archive before invoking $(AR) since `ar' on Apple/NeXT can not "update" MAB archives (see configure's --enable-fat-binary option); added rule for new missing/getcwd.c. * defines.h: fixed endian handling during MAB build (see configure's --enable-fat-binary option) to ensure that all portions of the project see the correct WORDS_BIGENDIAN value (some extension modules were getting the wrong endian setting); added missing constants GETPGRP_VOID, WNOHANG, WUNTRACED, X_OK, and type pid_t for NextStep and OpenStep; removed unnecessary and problematic HAVE_SYS_WAIT_H define in NeXT section. * dir.c: do not allow NAMLEN() macro to trust dirent::d_namlen on NextStep since, on some installations, this value always resolves uselessly to zero. * dln.c: added error reporting to NextStep extension loader since the previous behavior of failing silently was not useful; now ensures that NSLINKMODULE_OPTION_BINDNOW compatibility constant is defined for OpenStep and Rhapsody; no longer includes <mach-o/dyld.h> twice on Rhapsody since this header lacks multiple-include protection, which resulted in "redefinition" compilation errors. * main.c: also create hard reference to objc_msgSend() on NeXT platforms (in addition to Apple platforms). * lib/mkmf.rb: now exports XCFLAGS from configure script to extension makefiles so that extensions can be built MAB (see configure's --enable-fat-binary option); also utilize XCFLAGS in cc_command() (but not cpp_command() because MAB flags are incompatible with direct invocation of `cpp'). * ext/curses/extconf.rb: now additionally checks for presence of these curses functions which are not present on NextStep or Openstep: bkgd(), bkgdset(), color(), curs(), getbkgd(), init(), scrl(), set(), setscrreg(), wattroff(), wattron(), wattrset(), wbkgd(), wbkgdset(), wscrl(), wsetscrreg() * ext/curses/curses.c: added appropriate #ifdef's for additional set of curses functions now checked by extconf.rb; fixed curses_bkgd() and window_bkgd() to correctly return boolean result rather than numeric result; fixed window_getbkgd() to correctly signal an error by returning nil rather than -1. * ext/etc/etc.c: setup_passwd() and setup_group() now check for null pointers before invoking rb_tainted_str_new2() upon fields extracted from `struct passwd' and `struct group' since null pointers in some fields are common on NextStep/OpenStep (especially so for the `pw_comment' field) and rb_tainted_str_new2() throws an exception when it receives a null pointer. * ext/pty/pty.c: include "util.h" for strdup()/ruby_strdup() for platforms such as NextStep and OpenStep which lack strdup(). * ext/socket/getaddrinfo.c: cast first argument of getservbyname(), gethostbyaddr(), and gethostbyname() from (const char*) to non-const (char*) for older platforms such as NextStep and OpenStep. * ext/socket/socket.c: include "util.h" for strdup()/ruby_strdup() for platforms such as NextStep and OpenStep which lack strdup(); include <netinet/in_systm.h> if present for NextStep and OpenStep; cast first argument of gethostbyaddr() and getservbyname() from (const char*) to non-const (char*) for older platforms. * ext/syslog/syslog.c: include "util.h" for strdup()/ruby_strdup() for platforms such as NextStep and OpenStep which lack strdup(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5002 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-11-20* check existence of "pthread.h"nagai
* define is_ruby_native_thread() macro when not HAVE_NATIVETHREAD git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4996 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-11-20* ruby.h: define is_ruby_native_thread() for no native thread environmentnagai
* eval.c: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4990 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-11-20* configure.in: always check existence of the pthread librarynagai
* ruby.h: define macros for ruby's native thread check * eval.c: add ruby's native thread check * gc.c: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4989 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-11-16* eval.c (rb_eval): iterator should return value from next insidenobu
begin/rescue/end. (ruby-bugs:PR#1218) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4969 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-11-16* eval.c (eval): prepend error position in evaluating string tomatz
"mesg" attribute string only when it's available and is a string. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4967 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-11-15* eval.c (eval): do not re-raise exception to avoid unnecessarymatz
exception copying, instead modify exception and internal information to adjust eval(). * eval.c (backtrace): can return the current frame information only if lev < -1. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4962 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-11-14* eval.c (rb_method_node): new API to retrieve method body.matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4957 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-11-06* eval.c (rb_load): save and restore rb_prohibit_interrupt.matz
[ruby-dev:21857] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4913 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-11-06* eval.c (rb_load): allow interrupt during loaded programmatz
evaluation. [ruby-dev:21834] * hash.c (rb_hash_fetch): always warn if default argument and a block are supplied at the same time. [ruby-dev:21842] * hash.c (env_fetch): ditto. * array.c (rb_ary_fetch): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4910 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-11-05configure.in, eval.c, signal.c: : add '--with-pthread-ext' optionnagai
to fix the pthread trouble on 'tcltklib' ext/tcltklib/README.1st: add the description of '--with-pthread-ext' ext/tk/lib/tktext.rb : add TkText#text_copy, text_cut, text_paste to support Tcl/Tk8.4's tk_textCopy, tk_textCut, tk_textPaste ext/tk/lib/tk.rb : add TkMenu#set_focus support Tcl/Tk's tk_menuSetFocus git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4904 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-11-04* io.c (read_all): fptr->f may be NULL, if IO is closed in thematz
signal handler. * io.c (io_read): ditto. * string.c (get_pat): remove 1.8.0 warning code. * string.c (rb_str_match): extend warning until 1.8.2. * string.c (rb_str_match2): ditto. * class.c (class_instance_method_list): remove 1.8.0 warnings. method_list now recurs. [ruby-dev:21816] * class.c (rb_obj_singleton_methods): ditto. * array.c (rb_ary_select): remove select with block. [ruby-dev:21824] * hash.c (rb_hash_select): ditto. * hash.c (env_select): ditto. * re.c (match_select): ditto. * struct.c (rb_struct_select): ditto. * process.c (check_uid_switch): remove duplicated error messages. * process.c (check_gid_switch): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4892 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-30031031matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4874 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-30* io.c (READ_DATA_BUFFERED): new macro to detect whether stdiomatz
buffer filled. * io.c (rb_io_fptr_cleanup): move path deallocation to rb_io_fptr_finalize (finalizer called by GC). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4865 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-30* parse.y (logop): left may be NULL. [ruby-talk:84539]matz
* eval.c (rb_eval): NODE_CASE nd_head may be NULL. * eval.c (rb_eval): remove never occurred NODE_WHEN branch. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4864 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-29* eval.c (proc_invoke): single array value to normal Proc#callmatz
(i.e. not via lambda call), should be treated just like yield. [ruby-dev:21726] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4860 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-29* eval.c (rb_longjmp): must not disturb original jump.matz
[ruby-dev:21733] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4855 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-29* eval.c (Init_Proc): taint preallocated exception objectmatz
sysstack_error. [ruby-talk:84534] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4854 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-27* eval.c (rb_longjmp): ignore reentering error while warning.nobu
[ruby-dev:21730] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4847 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-25* eval.c (rb_method_missing): protect exception from withinmatz
"inspect". (ruby-bugs PR#1204) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4841 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-23* eval.c (ruby_cleanup): initialize stack bottom for embedding.nobu
[ruby-dev:21686] * ext/dl/extconf.rb: move list of files to clean from DEPEND file, to get rid of macro redefinitions. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4836 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-23typo in comment.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4834 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-21* eval.c (ruby_cleanup): should not ignore exit_value in ENDmatz
execution. [ruby-dev:21670] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4828 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-21* eval.c (ruby_cleanup): call finalizers and exit procs beforematz
terminating threads. * eval.c (ruby_cleanup): preserve ruby_errinfo before ruby_finalize_0(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4826 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-20* eval.c (rb_eval): set current node after arguments evaluation.nobu
[ruby-dev:21632] * eval.c (rb_yield_0): set current node and keep it at local jump. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4814 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-20* eval.c (rb_thread_cleanup): keep thread group for main thread.nobu
[ruby-dev:21644] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4813 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-20* eval.c (rb_catch): backout.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4812 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-20* eval.c (PUSH_FRAME): generate unique number to be TAG_JUMP()matz
destination. * eval.c (localjump_destination): use unique number in ruby_frame for localjump destination. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4811 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-15* eval.c (ruby_run): just return FAILURE instead of parse errornobu
count. [ruby-list:38569] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4776 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-15* marshal.c (w_object): dump extended modules as well.matz
* marshal.c (r_object0): TYPE_USRMARSHAL should restore extended modules before invoking marshal_load. these two fixes are done by Masatoshi Seki <m_seki@mva.biglobe.ne.jp>. * parse.y (yylex): argument parentheses preceded by spaces should be warned; not error. [ruby-talk:84103] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4774 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-14* eval.c (ruby_finalize_0): return the given exit status unlessnobu
SystemExit got raised. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4759 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-13commit miss.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4755 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-13* eval.c (rb_require_safe): segfault after loading .so.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4754 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-13* eval.c (rb_feature_p): match by classified suffix.nobu
* eval.c (rb_require_safe): require library in the specified safe level. * variable.c (rb_autoload, rb_autoload_load): restore safe level when autoload was called. [ruby-dev:21338] * intern.h: prototypes; rb_require_safe. * test/runner.rb: accept non-option arguments. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4751 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-13* string.c (str_new4): should not preserve FL_TAINT status in thematz
internal shared string. [ruby-dev:21601] * string.c (rb_str_new4): ditto. * eval.c: use EXIT_SUCCESS and EXIT_FAILURE for exit values. * process.c: ditto. [ruby-dev:38521] * lib/debug.rb (debug_command): should enter emacs mode when assigned any value to the environment variable "EMACS". On Meadow, (getenv "EMACS") is "meadow". git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4749 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-09* eval.c (is_defined): inheritance line adjustment as like asnobu
rb_call_super(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4735 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-09* eval.c (rb_thread_start_0): prevent thread from GC.nobu
[ruby-dev:21572] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4732 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-09* eval.c (rb_thread_start_0): non-volatile should be restored fromnobu
volatile. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4731 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-09* eval.c (proc_save_safe_level, proc_get_safe_level,nobu
proc_set_safe_level): save/restore safe level 1..4. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4730 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-09* eval.c (rb_set_end_proc, rb_exec_end_proc): restore safe level.nobu
[ruby-dev:21557] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4728 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-09* eval.c (rb_yield_0): no error if block is empty.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4727 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-09eval.c (eval): re-indented.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4725 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-08* eval.c (localjump_error): id should be ID.nobu
* eval.c (rb_eval): nd_rval is set in copy_node_scope(). * eval.c (rb_yield_0): unused variable. * eval.c (rb_yield_0): nothing to do for empty node. * eval.c (call_end_proc, proc_invoke): adjust backtrace in END. [ruby-dev:21551] * eval.c (rb_thread_start_0): set the value by break as the result. [ruby-dev:21552] * eval.c (rb_thread_start_0, rb_thread_raise, rb_callcc): save variables across THREAD_SAVE_CONTEXT. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4723 b2dd03c8-39d4-4d8f-98ff-823fe69b080e