[前][次][番号順一覧][スレッド一覧]

ruby-changes:25916

From: ko1 <ko1@a...>
Date: Thu, 29 Nov 2012 14:57:46 +0900 (JST)
Subject: [ruby-changes:25916] ko1:r37973 (trunk): * vm_trace.c (rb_tracepoint_attr_method_id):

ko1	2012-11-29 14:57:35 +0900 (Thu, 29 Nov 2012)

  New Revision: 37973

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=37973

  Log:
    * 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,

  Modified files:
    trunk/ChangeLog
    trunk/include/ruby/debug.h
    trunk/test/ruby/test_settracefunc.rb
    trunk/vm_trace.c

Index: include/ruby/debug.h
===================================================================
--- include/ruby/debug.h	(revision 37972)
+++ include/ruby/debug.h	(revision 37973)
@@ -54,7 +54,7 @@
 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);
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 37972)
+++ ChangeLog	(revision 37973)
@@ -1,3 +1,12 @@
+Thu Nov 29 14:56:30 2012  Koichi Sasada  <ko1@a...>
+
+	* 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@a...>
 
 	* vm_trace.c (rb_tracepoint_attr_defined_class): 
Index: vm_trace.c
===================================================================
--- vm_trace.c	(revision 37972)
+++ vm_trace.c	(revision 37973)
@@ -702,7 +702,7 @@
 }
 
 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 @@
     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);
Index: test/ruby/test_settracefunc.rb
===================================================================
--- test/ruby/test_settracefunc.rb	(revision 37972)
+++ test/ruby/test_settracefunc.rb	(revision 37973)
@@ -418,7 +418,7 @@
 
     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 @@
     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 @@
   def test_tracepoint_enable
     ary = []
     trace = TracePoint.new(:call){|tp|
-      ary << tp.id
+      ary << tp.method_id
     }
     foo
     trace.enable{
@@ -614,7 +614,7 @@
   def test_tracepoint_disable
     ary = []
     trace = TracePoint.trace(:call){|tp|
-      ary << tp.id
+      ary << tp.method_id
     }
     foo
     trace.disable{

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]