summaryrefslogtreecommitdiff
path: root/eval.c
AgeCommit message (Collapse)Author
2010-06-10merge revision(s) 26159:shyouhei
* eval.c (rb_load): initialize orig_func. [ruby-core:27296] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@28246 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-06-08merge revision(s) 27983:shyouhei
* io.c, eval.c, process.c: remove all condition of r26371. now, all platform use the same way. [Bug #3278][ruby-core:30167] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@28222 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-06-08merge revision(s) 27398:shyouhei
* eval.c (search_required): expand home relative path first. [ruby-core:29610] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@28210 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-06-08merge revision(s) 26371,26373,26374,26972:shyouhei
* eval.c (thread_timer, rb_thread_stop_timer): check the timing of stopping timer. patch from KOSAKI Motohiro <kosaki.motohiro _AT_ jp.fujitsu.com> * eval.c (rb_thread_start_timer): NetBSD5 seems to be hung when calling pthread_create() from pthread_atfork()'s parent handler. * io.c (pipe_open): workaround for NetBSD5. stop timer thread before fork(), and start it if needed. * process.c (rb_f_fork, rb_f_system): ditto. fixed [ruby-dev:40074] jp.fujitsu.com> via IRC. fork(), and restart it after fork() on parent, and on child if needed. these changes are tested by naruse. fixed [ruby-dev:40074] * io.c, eval.c, process.c: add linux to r26371's condition. patched by Motohiro KOSAKI [ruby-core:28151] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@28203 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-22merge revision(s) 26534:26536:shyouhei
* eval.c (proc_invoke): reverted r25975. [ruby-dev:39931] [ruby-dev:40059] * eval.c (rb_mod_define_method): return original block but not bound block. [ruby-core:26984] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@27954 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-20merge revision(s) 26277:shyouhei
* eval.c (recursive_push): Taint internal hash to prevent unexpected SecurityError; fixes #1864. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@27914 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-12-21revert revision r26082. cf: [ruby-dev:39889]shyouhei
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@26142 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-12-14merge revision(s) 25975:shyouhei
* eval.c (proc_invoke): unbound block created by define_method cannot call super. [ruby-core:26984] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@26091 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-12-14merge revision(s) 25890:shyouhei
* eval.c (rb_method_missing): adjusted format and argument number. * eval.c (rb_call): fixed for super in cached method. [ruby-dev:39757] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@26088 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-12-13merge revision(s) 25693:shyouhei
* eval.c (method_inspect, method_name, mnew): Bug fix when method created from an alias. Based on a patch by Peter Vanbroekhoven [ruby-core:22040] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@26083 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-12-13merge revision(s) 25670:shyouhei
* eval.c (call_trace_func): remove the trace hook if any exception raised. [ruby-list:46515] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@26082 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-11-25merge revision(s) 25359:shyouhei
* eval.c (rb_clear_cache_for_undef): clear entries for inherited methods. [ruby-core:26074] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@25914 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-11-17merge revision(s) 24958,24979:shyouhei
* eval.c (rb_thread_start_timer): start to catch SIGVTALRM together with timer thread. [ruby-core:25606] * eval.c (rb_thread_atfork): stop timer thread. * eval.c (rb_thread_start_0, rb_thread_start_1): should call star timer after added new thread to thread list. [ruby-core:25613] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@25819 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-11merge revision(s) 22679:shyouhei
* class.c (rb_singleton_class_clone): Qnil must be used for a null class reference when we use NIL_P() to check class reference validity. The bug was exposed by the spec test of Sequel. * eval.c (ruby_init): Use NEW_CREF(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@24843 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-07merge revision(s) 24413,24416,24442:shyouhei
* eval.c (rb_thread_schedule): fix condition for making thread runnable. [ruby-core:23515] * eval.c (rb_thread_schedule): refine previous change. * eval.c (rb_thread_schedule): need select for WAIT_SELECT, even if already timeout. [ruby-dev:38971] (WAIT_DONE): defined for mark threads which can be runnable. * ext/digest/sha2/sha2.h: include inttypes.h for uint32_t, etc. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@24783 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-06merge revision(s) 24403:shyouhei
* eval.c (rb_exc_raise, rb_exc_fatal): require exception object. [ruby-core:24767] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@24772 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-14merge revision(s) 23202,23268,23305:shyouhei
* eval.c (safe_mutex_lock): pthread_cleanup_push() must not be inside parens. * eval.c (rb_thread_start_timer): guard condition was inverted. [ruby-dev:38319] * eval.c (get_ts): use readtime clock. [ruby-dev:38354] * eval.c (rb_thread_stop_timer): clear thread_init while locking. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@24104 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-09merge revision(s) 23257:shyouhei
* eval.c (proc_invoke): shares dmethod scope local variables. a patch from coderrr at [ruby-core:23050] * gc.c (obj_free): do not free cloned scope local variables. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@23997 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-08merge revision(s) 23201:shyouhei
* eval.c (rb_thread_remove): stops timer thread unless other threads exist. [ruby-core:18444] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@23993 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-06merge revision(s) 23096:shyouhei
* eval.c (rb_eval): checks for interrupt, stack and finalizers too. [ruby-dev:38208], [Bug #1329] * eval.c (eval): replaces the message if frozen. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@23972 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-08merge revision(s) 22627:shyouhei
* eval.c (rb_thread_schedule): mswin32 doesn't have F_GETFD, so check with another method. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@23648 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-03merge revision(s) 22674:shyouhei
* eval.c (rb_eval): needs to guard intermediate string objects. based on a patch from Brent Roman <brent AT mbari.org> a [ruby-core:22584]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@23626 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-05-26merge revision(s) 22299:shyouhei
* eval.c (rb_thread_schedule): handle EBADF of select as well. [ruby-core:21264] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@23577 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-23merge revision(s) 17874,17886:shyouhei
* eval.c (rb_thread_join): new API. * ext/thread/thread.c (wait_mutex, lock_mutex): wait until the locking thread exits. [ruby-dev:34856] * eval.c (rb_thread_value): missed to change at r17874. [ruby-core:17595] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@23044 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-22merge revision(s) 21354:shyouhei
* eval.c (stack_extend): streamlined rb_thread_restore_context() to ensure O(1) time. based on a patch by Brent Roman <brent AT mbari.org>. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@22544 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-22merge revision(s) 21353:shyouhei
* eval.c (cc_mark): frees the continuation's stack if its thread is dead to avoid recursive gc that segfaults. [ruby-core:13889] a patch by Brent Roman <brent AT mbari.org>. * eval.c (rb_cont_check): checks for valid continuation instance. * eval.c (rb_callcc): assigns th->thread before scope_dup() to avoid segfaults if this scope_dup() triggers a gc pass. a patch by Brent Roman <brent AT mbari.org>. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@22540 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-21merge revision(s) 21165:shyouhei
* eval.c (rb_thread_schedule): Don't change status of threads which don't run next even if select notify readability/writability. [ruby-core:20446] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@22478 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-19merge revision(s) 20578:shyouhei
* eval.c (rb_yield_0): Qundef means no argument. [ruby-Bugs-22525] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@22442 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-10merge revision(s) 20225:shyouhei
* eval.c (load_lock): makes circular require deadlock. [ruby-core:19821] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@22205 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-10merge revision(s) 20214:shyouhei
* eval.c (rb_feature_p): returns found feature name if loading. [ruby-core:19798] * eval.c (search_required): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@22201 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-28merge revision(s) 19690:shyouhei
* eval.c (rb_mod_modfunc): method undefined in included module may not have nd_body. [ruby-core:18738] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@21857 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-16merge revision(s) 18485:shyouhei
* class.c (clone_method): should copy cbase in cref as well. [ruby-dev:35116] * node.h (NEW_CREF): new NEW_ macro. * eval.c (PUSH_CREF): use NEW_CREF(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@21585 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-15merge revision(s) 18463:shyouhei
* gc.c (STACK_LEVEL_MAX, ruby_stack_length): returns size_t. [ruby-core:18207] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@21524 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-07merge revision(s) 18355:shyouhei
* eval.c (timeofday): use monotonic clock. based on a patch from zimbatm <zimbatm@oree.ch> in [ruby-core:16627]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@21359 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-05merge revision(s) 18316,18319:shyouhei
* rubysig.h (CHECK_INTS): gives the chance to perform to deferred finalizers before explicit GC.start or the process termination. [ruby-core:18045] * eval.c (rb_thread_schedule): runs deferred finalizers. * gc.c (gc_sweep): sets rb_thread_pending to run deferred finalizers. * rubysig.h (CHECK_INTS): now checks rb_thread_pending even on platforms where setitimer is not available. [ruby-core:18045] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@21334 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-04merge revision(s) 17833:17837:shyouhei
* gc.c (Init_GC): fix syntax error. * error.c (rb_exc_new3): keeps the given string itself. * eval.c (Init_Proc), gc.c (Init_GC): freeze messages of preallocated special exceptions also. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@18327 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-07merge revision(s) 17832:shyouhei
* eval.c (rb_longjmp): duplicate the thrown exception to set backtrace if it was frozen. clear all raised flags. * eval.c (stack_check): leave clearing flag to rb_longjmp. * eval.c (rb_thread_set_raised, rb_thread_reset_raised): use generic flags. * eval.c (Init_Proc), gc.c (Init_GC): freeze preallocated special exceptions. * gc.c (rb_memerror): use thread raised flag instead of static flag, and raise nomem_error without backtrace if failed to make backtrace. [ruby-dev:34724] * gc.c (ruby_xmalloc): increase malloc_increase only if malloc succeeds. failed malloc size can be huge. it may increase malloc_limit too big which cause less GC and memory full. (ruby_xrealloc): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@17930 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-29merge revision(s) 17636:shyouhei
* eval.c (rb_obj_respond_to): use RTEST to test the result of respond_to? method. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@17717 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-29merge revision(s) 17581:shyouhei
* eval.c (rb_call0): wrong condition to check insecure method. a patch from Keita Yamaguchi <keita.yamaguchi at gmail.com>. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@17696 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-29merge revision(s) 17547:shyouhei
* eval.c (PUSH_FRAME, PUSH_CLASS): Add volatile to avoid a possible optimization bug on OS X/PPC. This at least makes build with gcc -O1 and `make test' pass. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@17680 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-31Merge from ruby_1_8.knu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@16719 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-27Merge from ruby_1_8.knu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@16636 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-26Merge from ruby_1_8.knu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@16606 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-26Merge from ruby_1_8, including r16205.knu
Note that passing a block to a Proc is experimental and partly broken. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@16605 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-24Merge from ruby_1_8.knu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@16578 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-24Merge from ruby_1_8.knu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@16575 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-22Merge from ruby_1_8.knu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@16539 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-22Merge from ruby_1_8.knu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@16521 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-21Merge from ruby_1_8.knu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@16511 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-18Merge -r16241:16456 from ruby_1_8.knu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@16458 b2dd03c8-39d4-4d8f-98ff-823fe69b080e