aboutsummaryrefslogtreecommitdiffstats
path: root/test/ruby/test_continuation.rb
Commit message (Collapse)AuthorAgeFilesLines
* Add frozen_string_literal: false for all filesnaruse2015-12-161-0/+1
| | | | | | When you change this to true, you may need to add more tests. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53141 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/ruby: suppress warningsnobu2014-11-291-1/+1
| | | | | | | | | | | | | | | * test/ruby/test_array.rb: (need_continuation): suppress warnings to require continuation. * test/ruby/test_continuation.rb: ditto. * test/ruby/test_enum.rb: ditto. * test/ruby/test_fiber.rb: ditto. * test/ruby/test_hash.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48642 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/lib/envutil.rb: Moved from test/ruby/.akr2014-11-131-1/+0
| | | | | | | | | | | | | | * test/lib/find_executable.rb: Ditto. * test/lib/memory_status.rb: Ditto. * test/lib/test/unit.rb: require envutil. * test/: Don't require envutil in test files. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48409 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test_continuation.rb (tracing_with_thread_set_trace_func):ko12012-08-211-1/+1
| | | | | | | | fix to use Thread#set_trace_func(nil), not set_trace_func(nil). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36748 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_trace.c, vm_core.h: simplify tracing mechanism.ko12012-08-161-5/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (1) add rb_hook_list_t data structure which includes hooks, events (flag) and `need_clean' flag. If the last flag is true, then clean the hooks list. In other words, deleted hooks are contained by `hooks'. Cleanup process should run before traversing the list. (2) Change check mechanism See EXEC_EVENT_HOOK() in vm_core.h. (3) Add `raw' hooks APIs Normal hooks are guarded from exception by rb_protect(). However, this protection is overhead for too simple functions which never cause exceptions. `raw' hooks are executed without protection and faster. Now, we only provide registration APIs. All `raw' hooks are kicked under protection (same as normal hooks). * include/ruby/ruby.h: remove internal data definition and macros. * internal.h (ruby_suppress_tracing), vm_trace.c: rename ruby_suppress_tracing() to rb_suppress_tracing() and remove unused function parameter. * parse.y: fix to use renamed rb_suppress_tracing(). * thread.c (thread_create_core): no need to set RUBY_VM_VM. * vm.c (mark_event_hooks): move definition to vm_trace.c. * vm.c (ruby_vm_event_flags): add a global variable. This global variable represents all of Threads and VM's event masks (T1#events | T2#events | ... | VM#events). You can check the possibility kick trace func or not with ruby_vm_event_flags. ruby_vm_event_flags is maintained by vm_trace.c. * cont.c (fiber_switch, rb_cont_call): restore tracing status. [Feature #4347] * test/ruby/test_continuation.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36715 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_continuation.rb (tracing_with_set_trace_func): don'tnagachika2012-04-301-2/+5
| | | | | | call Continuation from other threads. [ruby-dev:45596] [Bug #6382] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35498 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * thread.c (set_trace_func, thread_set_trace_func_m): reset tracingmame2011-07-211-0/+43
| | | | | | | | | | | state when set_trace_func hook is removed. This is workaround patch to force to reset tracing state that is broken by continuation call. a patch from James M. Lawrence. [Feature #4347] [ruby-core:34998] * test/ruby/test_continuation.rb (class TestContinuation): add a test for above. a patch from James M. Lawrence. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32597 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* add a test for [ruby-dev:34802].akr2008-05-221-0/+14
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16529 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/envutil.rb (assert_normal_exit): capture stdout and stderrakr2008-05-221-0/+12
| | | | | | | of the child process. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16520 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/ruby/test_continuation.rb: remove duplicated test.matz2008-05-081-14/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16329 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/envutil.rb (Test::Unit::Assertions#assert_normal_exit):akr2008-05-031-0/+15
| | | | | | | new method. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16279 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * cont.c: fix to remove Fiber.new until fiber.so is not loaded.ko12007-08-261-1/+1
| | | | | | | | * test/ruby/test_continuation.rb: fix to use resume. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13278 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * cont.c: separate Continuation and Fiber from core.ko12007-08-251-0/+2
| | | | | | | | | | | | | | * ext/continuation/*, ext/fiber/*: ditto. * include/ruby/ruby.h: remove rb_cFiber. * include/ruby/intern.h: add the rb_fiber_new() declaration. * enumerator.c (next_init): fix to use rb_fiber_new(). * test/ruby/test_enumerator.rb: remove next? tests. * test/ruby/test_continuation.rb: add a require 'continuation'. * test/ruby/test_fiber.rb: add a require 'fiber'. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13259 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_continuation.rb: add a test for last commit.ko12007-06-061-0/+7
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12448 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * cont.c (cont_capture): store all local variables in heapko12007-05-301-0/+14
| | | | | | | | | | | ([ruby-dev:30832]). * vm.c (th_stack_to_heap): added. * test/ruby/test_continuation.rb: add a test for above. * eval_intern.h (th_get_ruby_level_cfp): fix to clean code. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12415 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * cont.c: fix bug around Continuation and Fiber.ko12007-05-291-0/+31
* test/ruby/test_continuation.rb: add tests for Continuation. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12401 b2dd03c8-39d4-4d8f-98ff-823fe69b080e