summaryrefslogtreecommitdiff
path: root/ext/-test-
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-11-26 08:41:44 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-11-26 08:41:44 +0000
commit5b40cb6a2cc6085a346f0f34be03b6ffdaeda8ca (patch)
tree67211fab4ded1d08a0aa737446a5f20428b599a2 /ext/-test-
parent079009fb93678e902777669c663ed6f651a05c85 (diff)
* vm_trace.c: prohibit to specify normal events and internal events
simultaneously. I will introduce special care for internal events later. * ext/-test-/tracepoint/tracepoint.c: test this behavior. * test/-ext-/tracepoint/test_tracepoint.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43854 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/-test-')
-rw-r--r--ext/-test-/tracepoint/tracepoint.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/ext/-test-/tracepoint/tracepoint.c b/ext/-test-/tracepoint/tracepoint.c
index a974c2c..ebe2996 100644
--- a/ext/-test-/tracepoint/tracepoint.c
+++ b/ext/-test-/tracepoint/tracepoint.c
@@ -69,9 +69,18 @@ tracepoint_track_objspace_events(VALUE self)
return result;
}
+static VALUE
+tracepoint_specify_normal_and_internal_events(VALUE self)
+{
+ VALUE tpval = rb_tracepoint_new(0, RUBY_INTERNAL_EVENT_NEWOBJ | RUBY_EVENT_CALL, 0, 0);
+ rb_tracepoint_enable(tpval);
+ return Qnil; /* should not be reached */
+}
+
void
Init_tracepoint(void)
{
VALUE mBug = rb_define_module("Bug");
rb_define_module_function(mBug, "tracepoint_track_objspace_events", tracepoint_track_objspace_events, 0);
+ rb_define_module_function(mBug, "tracepoint_specify_normal_and_internal_events", tracepoint_specify_normal_and_internal_events, 0);
}