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

ruby-changes:25915

From: ko1 <ko1@a...>
Date: Thu, 29 Nov 2012 14:52:38 +0900 (JST)
Subject: [ruby-changes:25915] ko1:r37972 (trunk): * vm_trace.c (rb_tracepoint_attr_defined_class):

ko1	2012-11-29 14:52:27 +0900 (Thu, 29 Nov 2012)

  New Revision: 37972

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

  Log:
    * vm_trace.c (rb_tracepoint_attr_defined_class):
      rename TracePoint#klass to TracePoint#defined_class.
      [ruby-core:50187] Re: [ruby-trunk - Feature #6895]
    * 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 37971)
+++ include/ruby/debug.h	(revision 37972)
@@ -55,7 +55,7 @@
 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_klass(VALUE tpval);
+VALUE rb_tracepoint_attr_defined_class(VALUE tpval);
 VALUE rb_tracepoint_attr_binding(VALUE tpval);
 VALUE rb_tracepoint_attr_self(VALUE tpval);
 VALUE rb_tracepoint_attr_return_value(VALUE tpval);
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 37971)
+++ ChangeLog	(revision 37972)
@@ -1,3 +1,13 @@
+Thu Nov 29 14:49:10 2012  Koichi Sasada  <ko1@a...>
+
+	* vm_trace.c (rb_tracepoint_attr_defined_class): 
+	  rename TracePoint#klass to TracePoint#defined_class.
+	  [ruby-core:50187] Re: [ruby-trunk - Feature #6895]
+
+	* include/ruby/debug.h: ditto.
+
+	* test/ruby/test_settracefunc.rb: ditto.
+
 Thu Nov 29 14:27:57 2012  Koichi Sasada  <ko1@a...>
 
 	* gc.c (gc_stat): prepre Symbol objects at first time
Index: vm_trace.c
===================================================================
--- vm_trace.c	(revision 37971)
+++ vm_trace.c	(revision 37972)
@@ -711,7 +711,7 @@
 }
 
 VALUE
-rb_tracepoint_attr_klass(VALUE tpval)
+rb_tracepoint_attr_defined_class(VALUE tpval)
 {
     rb_tp_t *tp = tpptr(tpval);
     tp_attr_check_active(tp);
@@ -960,7 +960,7 @@
     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, "klass", rb_tracepoint_attr_klass, 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);
     rb_define_method(rb_cTracePoint, "return_value", rb_tracepoint_attr_return_value, 0);
Index: test/ruby/test_settracefunc.rb
===================================================================
--- test/ruby/test_settracefunc.rb	(revision 37971)
+++ test/ruby/test_settracefunc.rb	(revision 37972)
@@ -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.klass, tp.id, tp.self, tp.binding.eval("local_var"), get_data.(tp)]
+    2:   events << [tp.event, tp.lineno, tp.path, tp.defined_class, tp.id, tp.self, tp.binding.eval("local_var"), get_data.(tp)]
     3: }
     4: 1.times{|;local_var| local_var = :inner
     5:   tap{}
@@ -588,7 +588,7 @@
     assert_raise(RuntimeError){tp_store.event}
     assert_raise(RuntimeError){tp_store.path}
     assert_raise(RuntimeError){tp_store.id}
-    assert_raise(RuntimeError){tp_store.klass}
+    assert_raise(RuntimeError){tp_store.defined_class}
     assert_raise(RuntimeError){tp_store.binding}
     assert_raise(RuntimeError){tp_store.self}
     assert_raise(RuntimeError){tp_store.return_value}

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

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