aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-11-29 05:57:35 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-11-29 05:57:35 +0000
commit479e39619240d7723f0573add301d71125df6933 (patch)
tree748ed7174937385aaf8b418df2163b7f48426a06
parent89c889d4e72eb39bb70734d2360b9607c1099bdb (diff)
downloadruby-479e39619240d7723f0573add301d71125df6933.tar.gz
* vm_trace.c (rb_tracepoint_attr_method_id):
rename TracePoint#id to TracePoint#method_id. * include/ruby/debug.h: ditto. * test/ruby/test_settracefunc.rb: ditto, git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37973 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog9
-rw-r--r--include/ruby/debug.h2
-rw-r--r--test/ruby/test_settracefunc.rb8
-rw-r--r--vm_trace.c4
4 files changed, 16 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index dab9d5b76a..484d388987 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+Thu Nov 29 14:56:30 2012 Koichi Sasada <ko1@atdot.net>
+
+ * vm_trace.c (rb_tracepoint_attr_method_id):
+ rename TracePoint#id to TracePoint#method_id.
+
+ * include/ruby/debug.h: ditto.
+
+ * test/ruby/test_settracefunc.rb: ditto,
+
Thu Nov 29 14:49:10 2012 Koichi Sasada <ko1@atdot.net>
* vm_trace.c (rb_tracepoint_attr_defined_class):
diff --git a/include/ruby/debug.h b/include/ruby/debug.h
index e7a1102250..19b7090007 100644
--- a/include/ruby/debug.h
+++ b/include/ruby/debug.h
@@ -54,7 +54,7 @@ VALUE rb_tracepoint_enabled_p(VALUE tpval);
VALUE rb_tracepoint_attr_event(VALUE tpval);
VALUE rb_tracepoint_attr_lineno(VALUE tpval);
VALUE rb_tracepoint_attr_path(VALUE tpval);
-VALUE rb_tracepoint_attr_id(VALUE tpval);
+VALUE rb_tracepoint_attr_method_id(VALUE tpval);
VALUE rb_tracepoint_attr_defined_class(VALUE tpval);
VALUE rb_tracepoint_attr_binding(VALUE tpval);
VALUE rb_tracepoint_attr_self(VALUE tpval);
diff --git a/test/ruby/test_settracefunc.rb b/test/ruby/test_settracefunc.rb
index cbbfea684a..0c08e7f245 100644
--- a/test/ruby/test_settracefunc.rb
+++ b/test/ruby/test_settracefunc.rb
@@ -418,7 +418,7 @@ class TestSetTraceFunc < Test::Unit::TestCase
eval <<-EOF.gsub(/^.*?: /, ""), nil, 'xyzzy'
1: trace = TracePoint.trace(*trace_events){|tp|
- 2: events << [tp.event, tp.lineno, tp.path, tp.defined_class, tp.id, tp.self, tp.binding.eval("local_var"), get_data.(tp)]
+ 2: events << [tp.event, tp.lineno, tp.path, tp.defined_class, tp.method_id, tp.self, tp.binding.eval("local_var"), get_data.(tp)]
3: }
4: 1.times{|;local_var| local_var = :inner
5: tap{}
@@ -587,7 +587,7 @@ class TestSetTraceFunc < Test::Unit::TestCase
assert_raise(RuntimeError){tp_store.lineno}
assert_raise(RuntimeError){tp_store.event}
assert_raise(RuntimeError){tp_store.path}
- assert_raise(RuntimeError){tp_store.id}
+ assert_raise(RuntimeError){tp_store.method_id}
assert_raise(RuntimeError){tp_store.defined_class}
assert_raise(RuntimeError){tp_store.binding}
assert_raise(RuntimeError){tp_store.self}
@@ -601,7 +601,7 @@ class TestSetTraceFunc < Test::Unit::TestCase
def test_tracepoint_enable
ary = []
trace = TracePoint.new(:call){|tp|
- ary << tp.id
+ ary << tp.method_id
}
foo
trace.enable{
@@ -614,7 +614,7 @@ class TestSetTraceFunc < Test::Unit::TestCase
def test_tracepoint_disable
ary = []
trace = TracePoint.trace(:call){|tp|
- ary << tp.id
+ ary << tp.method_id
}
foo
trace.disable{
diff --git a/vm_trace.c b/vm_trace.c
index 6971f9dd75..2fbc512e89 100644
--- a/vm_trace.c
+++ b/vm_trace.c
@@ -702,7 +702,7 @@ fill_id_and_klass(rb_trace_arg_t *trace_arg)
}
VALUE
-rb_tracepoint_attr_id(VALUE tpval)
+rb_tracepoint_attr_method_id(VALUE tpval)
{
rb_tp_t *tp = tpptr(tpval);
tp_attr_check_active(tp);
@@ -959,7 +959,7 @@ Init_vm_trace(void)
rb_define_method(rb_cTracePoint, "event", rb_tracepoint_attr_event, 0);
rb_define_method(rb_cTracePoint, "lineno", rb_tracepoint_attr_lineno, 0);
rb_define_method(rb_cTracePoint, "path", rb_tracepoint_attr_path, 0);
- rb_define_method(rb_cTracePoint, "id", rb_tracepoint_attr_id, 0);
+ rb_define_method(rb_cTracePoint, "method_id", rb_tracepoint_attr_method_id, 0);
rb_define_method(rb_cTracePoint, "defined_class", rb_tracepoint_attr_defined_class, 0);
rb_define_method(rb_cTracePoint, "binding", rb_tracepoint_attr_binding, 0);
rb_define_method(rb_cTracePoint, "self", rb_tracepoint_attr_self, 0);