diff options
-rw-r--r-- | ChangeLog | 10 | ||||
-rw-r--r-- | include/ruby/debug.h | 2 | ||||
-rw-r--r-- | test/ruby/test_settracefunc.rb | 4 | ||||
-rw-r--r-- | vm_trace.c | 4 |
4 files changed, 15 insertions, 5 deletions
@@ -1,3 +1,13 @@ +Thu Nov 29 14:49:10 2012 Koichi Sasada <ko1@atdot.net> + + * 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@atdot.net> * gc.c (gc_stat): prepre Symbol objects at first time diff --git a/include/ruby/debug.h b/include/ruby/debug.h index 631be79d76..e7a1102250 100644 --- a/include/ruby/debug.h +++ b/include/ruby/debug.h @@ -55,7 +55,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_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); diff --git a/test/ruby/test_settracefunc.rb b/test/ruby/test_settracefunc.rb index 935fe3f8b5..cbbfea684a 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.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 @@ class TestSetTraceFunc < Test::Unit::TestCase 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} diff --git a/vm_trace.c b/vm_trace.c index ddd8dfd3be..6971f9dd75 100644 --- a/vm_trace.c +++ b/vm_trace.c @@ -711,7 +711,7 @@ rb_tracepoint_attr_id(VALUE tpval) } 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 @@ Init_vm_trace(void) 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); |