summaryrefslogtreecommitdiff
path: root/eval.c
AgeCommit message (Collapse)Author
2004-02-27* eval.c (proc_invoke): no orphan block check is needed when pcallmatz
is true. * eval.c (localjump_destination): update localjump condition. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5845 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-02-26* eval.c (localjump_destination): lambda should not interferematz
return from the yielded block. * hash.c (delete_if_i): use st_delete_safe() (via rb_hash_delete()) instead of returning ST_DELETE. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5842 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-02-16* eval.c (rb_eval): care that another thread replace NODE_DREGX_ONCEakr
to NODE_LIT. [ruby-dev:22920] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5740 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-02-10* eval.c (method_proc): return bound Proc object. [ruby-dev:22854]nobu
* eval.c (rb_mod_define_method): bind method body itself for Method object. * node.h (NODE_DMETHOD): deprecated. * object.c (rb_class_inherited_p): export. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5667 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-02-10* eval.c (umethod_bind): perge unused check. [ruby-dev:22850]nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5664 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-01-22* parse.y (opt_rescue): use NODE_ERRINFO() instead ofmatz
NODE_GVAR("$!"), to avoid confusion from variable aliasing. [ruby-talk:90074] * version.c (Init_version): remove obsolete constants VERSION etc. [ruby-dev:22643] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5538 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-01-21* parse.y (newline_node): do not use NODE_NEWLINE node anymore,matz
use NEWLINE flag instead. * ext/socket/socket.c (sock_gethostbyname): returns host if ai_canonname is NULL. (ruby-bugs PR#1243) * parse.y (block_append): update nd_end for "real" head node. [ruby-list:39058] * marshal.c (w_class): should not dump singleton class. [ruby-dev:22631] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5535 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-01-19* variable.c (rb_set_class_path): do not set path ifmatz
* lib/cgi.rb (CGI::QueryExtension): give extended string, not a delegater object. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5501 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-01-19* error.c (NameError::message): internal use only.nobu
* eval.c (rb_method_missing): use hidden constant. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5500 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-01-17* error.c (NameError::Message): new class for lazy evaluation ofnobu
message to ensure replaced before marshalling. [ruby-dev:22604] * eval.c (rb_method_missing): use NameError::Message. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5481 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-01-16* eval.c (proc_eq): compare also arguments and environmentnobu
(including local variables). [ruby-dev:22590] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5476 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-01-16* eavl.c (proc_eq): compare also arguments and environment.nobu
[ruby-dev:22590] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5472 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-01-10* configure.in: install rdoc by default. if you do not want tomatz
install rdoc, specify --disable-install-doc. * eval.c (eval): need to add message delimiter. [ruby-dev:22561] * defines.h (__NeXT__): Ensure that all standard S_IRUSR, S_IWGRP, S_IRWXO, etc. macros are defined since future code might require them (even though present code only requires a subset). * defines.h (__NeXT__): Bug fix: WORDS_BIGENDIAN was not being set correctly on Rhapsody when -arch compiler flag was used (via configure's --enable-fat-binary option). * ext/socket/socket.c (make_hostent): getaddrinfo(3) on BSD do not fill ai_canonname if serv is not supplied. (ruby-bugs PR#1243) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5430 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-01-08* eval.c, object.c, process.c, re.c: don't use C++ style comments.eban
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5412 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-01-07* eval.c (rb_mod_modfunc): should break if m has no super class.matz
[ruby-dev:22498] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5404 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-01-02* dir.c: merge tuning from H.Yamamoto <ocean@m2.ccsnet.ne.jp>.matz
[ruby-dev:22476] * io.c (argf_eof): ARGF.eof? should not have any side effect. [ruby-dev:22469] * io.c (argf_each_byte): should return self. [ruby-dev:22465] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5365 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-01-02Finish documenting internal stuff. See Changelog for other detailsdave
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5364 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-30Add RDoc for kernel functions, and tidy updave
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5352 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-29Add RDoc for Kernel global functions, tidy array and errordave
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5343 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-28RDoc comments for Proc, Method, and UnboundMethoddave
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5335 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-28Thread/ThradGroup RDocdave
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5325 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-26* configure.in: check if getcontext and setcontext are available.nobu
* eval.c: use presence of getcontext/setcontext. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5305 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-24* eval.c (search_required): search actual file name once when nonobu
extension specified. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5288 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-24* configure.in: check for nanosleep, -lrt if required.matz
[ruby-core:02059] * eval.c (thread_timer): use select(2) if nanosleep(2) is not available. * eval.c: check __stub_getcontext for glibc on some platforms. [ruby-list:38984] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5286 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-24* eval.c (catch_timer): do not call rb_thread_schedule() inside tomatz
avoid pthread_mutex_lock() deadlock. interrupts to system calls are detected by TRAP_END via EINTR error. * eval.c (thread_timer): do not post signal unless it is absolutely necessary. * rubysig.h (TRAP_END): add CHECK_INTS to switch thread. * regex.c (re_compile_pattern): check if nextp is smaller than pend. [ruby-dev:22372] * eval.c (umethod_bind): remove method overridden check. [ruby-dev:22366] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5279 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-23* io.c (read_all): do not return nil at the end of file.matz
[ruby-dev:22334] * io.c (argf_read): do not depend on nil at eof behavior of IO#read(). * eval.c (rb_thread_join): dup exception before re-raising it. * io.c (rb_io_eof): call clearerr() to prevent side effect. this patch is supplied by Masahiro Sakai <sakai@tom.sfc.keio.ac.jp>. [ruby-dev:22234] * pack.c (OFF16): get offset for big endian machines. * pack.c (pack_pack): use OFF16 instead of OFF16B. [ruby-dev:22344] * pack.c (pack_unpack): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5266 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-22* eval.c (rb_with_disable_interrupt): use ENABLE_INTS instead ofmatz
ALLOW_INTS which may switch context. [ruby-dev:22319] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5246 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-21* class.c (rb_check_inheritable): new function. [ruby-dev:22316]nobu
* intern.h: add prototype. * eval.c (superclass): use rb_check_inheritable(). * object.c (rb_class_initialize): check argument validity. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5236 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-21Add file.c comments (and necessary support in parse_c.rb)dave
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5234 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-20* eval.c (rb_with_disable_interrupt): prohibit thread contextmatz
switch during proc execution. [ruby-dev:21899] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5232 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-19Add boot_classes to rdoc parsing, fix a couple of bugsdave
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5216 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-18* eval.c (stack_extend): ignore inline optimization on VC7.usa
* win32/Makefile.sub (OS, RT): can override. * win32/Makefile.sub (LDFLAGS): ditto. shouldn't use pdb:none option. based on Tietew's patch [ruby-dev:22289] * lib/mkmf.rb (create_makefile): should remove deffile if it's made by miniruby. based on nobu's patch. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5212 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-17* lib/cgi.rb (CGI::QueryExtension::Value::[]): should work likematz
String#[] if more than one arguments are specified. * lib/delegate.rb: avoid using common instance name as "@obj". * lib/cgi.rb (CGI::QueryExtension::Value): Value is no longer subclass of String, but DelegateClass(String). * ext/curses/extconf.rb: restore function check for init_color. [ruby-list:38905] * Makefile.in: need to specify $(MAINLIBS) for the miniruby generation rule. * configure.in: better FreeBSD -lc_r support. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5206 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-15* eval.c (catch_timer): check rb_thread_crtical in main nativenobu
thread. * eval.c (thread_timer): just sends signals periodically, to prevent main native thread from receiving them in critical section. [ruby-core:01959] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5195 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-13* eval.c (thread_timer): use timer by sub-thread and nanosleep.matz
[ruby-talk:87519] * gc.c (Init_stack): no stack adjustment for THREAD_SAFE. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5184 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-13* eval.c (proc_alloc): cache the created object at first time.nobu
[ruby-talk:61288], [ruby-dev:22240] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5183 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-13* configure.in: check ucontext.h.nobu
* eval.c: use getcontext/setcontext() instead of setjmp/longjmp() on ia64 or with native thread enabled. [ruby-core:01932] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5180 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-11* eval.c (proc_invoke): fix class name in warning message fornobu
define_method. [ruby-dev:22235] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5174 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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