From 2fd663d256c75bf34e46df0013022fe0a0d01a88 Mon Sep 17 00:00:00 2001 From: ko1 Date: Thu, 19 Apr 2007 10:37:08 +0000 Subject: * eval.c, node.h, thread.c, yarvcore.[ch], eval_intern.h: support set_trace_func (incomplete. id and klass don't be passed). And support Thread#set_trace_func which hook only specified thread and Thread#add_trace_func which add new trace func instead of replace old one. C level API was modified. See thread.c (logic) and yarvcore.h (data structures). * vm.c, vm_macro.def: add hook points. * compile.c, insns.def: fix "trace" instruction. * iseq.c, vm_macro.h: add compile option "trace_instruction". * test/ruby/test_settracefunc.rb: hook "c-return" of set_trace_func. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@12195 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_settracefunc.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'test/ruby') diff --git a/test/ruby/test_settracefunc.rb b/test/ruby/test_settracefunc.rb index 617df574e..a7d9720d0 100644 --- a/test/ruby/test_settracefunc.rb +++ b/test/ruby/test_settracefunc.rb @@ -35,6 +35,8 @@ class TestSetTraceFunc < Test::Unit::TestCase eval("class Foo; end") set_trace_func nil + assert_equal(["c-return", 18, :set_trace_func, TestSetTraceFunc], + events.shift) # TODO assert_equal(["line", 19, :test_event, TestSetTraceFunc], events.shift) # a = 1 assert_equal(["line", 20, :test_event, TestSetTraceFunc], -- cgit