summaryrefslogtreecommitdiff
path: root/eval.c
AgeCommit message (Collapse)Author
2010-06-21eval.c: Bug #1886 [ruby-core:24767]; ensure that rb_exc_raise and ↵wyhaines
rb_exc_fatal require an exception object. Backport of r24403. test/ruby/test_exception.rb: test for exception change. Backport of r24404. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_6@28374 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-06-08eval.c: Backport #2202 [ruby-core:26074]; backport of r25359, which modifies ↵wyhaines
rb_clear_cache_for_undef to clear entries for inherited methods. test/ruby/test_object.rb: Backport #2202 [ruby-core:26074]; Added this file, from r25359, which tests a number of behaviors of Object, including this change. This version differs from the one in r25359 because there are several tests which currently fail on 1.8.6 because those capabilities are not implemented. Those tests are commented out. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_6@28229 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-02-04Syntax change and dead code cleanup to help resolve some build issues on ↵wyhaines
certain platforms. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_6@26577 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-02-03Backport #1743 [ruby-core:24203]; stops timer thread unless other threads exist.wyhaines
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_6@26561 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-26Backport #2039 [ruby-core:25339]; backported r24413, r24416, r24442 to fix a ↵wyhaines
problem with IO#select and threads. This is the same issue as Bug #199 3 [ruby-core:25114]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_6@26435 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-20eval.c: Backport #2592 [ruby-core:27525]; Added an ifndef for WIN32 so that ↵wyhaines
F_GETFD isn't used on that platform. Fixes a build issue. dln.c: Bug #2220 [ruby-core:26117]; Patch to fix dln.c so that extensions work properly under Snow Leopard. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_6@26361 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-20Backport #1001; handle EBADF in select() to avoid Interpreter-wide deadlock ↵wyhaines
when native close() is called on fd which is currently being IO#select()ed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_6@24600 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-10Fix method scoping bug.wyhaines
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_6@24030 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_6@23042 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_6@22542 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_6@22538 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_6@22476 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_6@22203 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_6@22199 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_6@21855 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_6@21583 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_6@21522 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_6@21357 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_6@21332 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_6@18325 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_6@17928 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_6@17715 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_6@17694 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_6@17678 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-29merge revision(s) 16507:shyouhei
* eval.c (search_method, remove_method, error_print, rb_alias) (rb_eval, rb_rescue2, search_required, Init_eval, rb_thread_create), gc.c (rb_source_filename, Init_stack), io.c (rb_io_getline), parse.y (rb_id2name, rb_parser_free): suppress warnings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_6@17646 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-28merge revision(s) 16536:shyouhei
* eval.c (rb_copy_node_scope), node.h: Rename from copy_node_scope and export. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_6@17628 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-16merge revision(s) 16514:shyouhei
* proc.c (proc_dup): should copy safe_level from src proc properly. a patch from Keita Yamaguchi <keita.yamaguchi at gmail.com> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_6@17359 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-15merge revision(s) 16564:shyouhei
* marshal.c (reentrant_check): check reentrance via callcc. [ruby-dev:34802] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_6@17319 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-15merge revision(s) 16385:shyouhei
* eval.c (is_defined): add NODE_OP_ASGN_{OR,AND}. "defined?(a||=1)" should not operate assignment. [ruby-dev:34645] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_6@17294 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-09merge revision(s) 15054:shyouhei
* eval.c (eval): check if backtrace is empty. [ruby-core:15040] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_6@17049 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-07merge revision(s) 15005:shyouhei
* eval.c (rb_define_alloc_func, rb_undef_alloc_func): should define/undef on a signleton class. [ruby-core:09959] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_6@17014 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-07merge revision(s) 14086:shyouhei
* eval.c (error_print): put newline unless multiple line message ends with a newline. [ruby-dev:32429] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_6@16970 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-07merge revision(s) 13957:shyouhei
* eval.c (rb_alias): do not call hook functions until initialization finishes. [ruby-talk:279538] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_6@16951 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-04merge revision(s) 13586:shyouhei
* eval.c (remove_method): should not remove undef place holder. [ruby-dev:31817] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_6@16816 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-09-23 * eval.c, intern.h, ext/thread/thread.c: should not free queue whileshyouhei
any live threads are waiting. [ruby-dev:30653] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_6@13495 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-09-07* eval.c (rb_thread_start_0): should unset time_thread_alive_p.shyouhei
[ruby-talk:257219], [ruby-core:11542], [ruby-dev:31253] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_6@13401 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-09-07 * eval.c (mnew): should preserve noex as safe_level.shyouhei
* eval.c (rb_call0): tighten security check condition.. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_6@13387 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-22 * eval.c (get_backtrace): check the result more.shyouhei
[ruby-dev:31261] [ruby-bugs-12398] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_6@13190 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-22 * eval.c (ruby_cleanup): return EXIT_FAILURE if any exceptions occuredshyouhei
in at_exit blocks. [ruby-core:11263] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_6@13148 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-21 * eval.c (rb_kill_thread): renamed in order to get rid of conflictshyouhei
with a BeOS system function. [ruby-core:10830] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_6@13138 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-08* eval.c (rb_thread_cancel_timer): fix undefined functionshyouhei
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_6@12493 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-08* eval.c (rb_eval_cmd): just return if no exceptions.shyouhei
[ruby-dev:30820] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_6@12485 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-08 * eval.c (rb_eval_cmd): just return if no exceptions.shyouhei
[ruby-dev:30820] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_6@12483 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-08* eval.c (rb_eval_cmd): just return if no exceptions.shyouhei
[ruby-dev:30820] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_6@12482 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-07* eval.c, intern.h, ext/thread/thread.c: should not free queueshyouhei
while any live threads are waiting. [ruby-dev:30653] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_6@12469 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-07* eval.c (method_inspect): show proper class name.shyouhei
[ruby-talk:248647], Thanks Calamitas. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_6@12459 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-05-26* eval.c (mnew): call of super via a method object should work again.shyouhei
[ruby-talk:248647], Thanks Calamitas. * test/ruby/test_method.rb (TestMethod::test_method_super): test for above fix. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_6@12391 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-05-22* process.c (proc_exec_v): terminate timer thread in advance.shyouhei
[ruby-dev:30581], Thanks H. Holon. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_6@12343 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-05-22merge -c 12267shyouhei
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_6@12330 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-05-22merge -c 12187shyouhei
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_6@12319 b2dd03c8-39d4-4d8f-98ff-823fe69b080e