diff options
author | Nobuyoshi Nakada <[email protected]> | 2020-05-31 15:52:32 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <[email protected]> | 2020-06-19 18:46:55 +0900 |
commit | 63aadc237f48be23803acae724401f8b4221fa38 (patch) | |
tree | 96ea77c66f42685bacacca4e69ac64139d93620d /trace_point.rb | |
parent | 49f0fd21e468e567dc122547d516eef42c0ce0d3 (diff) |
[Feature #16254] Use `Primitive.func` style
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/3165
Diffstat (limited to 'trace_point.rb')
-rw-r--r-- | trace_point.rb | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/trace_point.rb b/trace_point.rb index cb14f3a04c..52272a09e3 100644 --- a/trace_point.rb +++ b/trace_point.rb @@ -93,7 +93,7 @@ class TracePoint # Access from other threads is also forbidden. # def self.new(*events) - __builtin.tracepoint_new_s(events) + Primitive.tracepoint_new_s(events) end # call-seq: @@ -102,7 +102,7 @@ class TracePoint # Return a string containing a human-readable TracePoint # status. def inspect - __builtin.tracepoint_inspect + Primitive.tracepoint_inspect end # call-seq: @@ -115,7 +115,7 @@ class TracePoint # # This method is only for debugging TracePoint itself. def self.stat - __builtin.tracepoint_stat_s + Primitive.tracepoint_stat_s end # Document-method: trace @@ -132,7 +132,7 @@ class TracePoint # trace.enabled? #=> true # def self.trace(*events) - __builtin.tracepoint_trace_s(events) + Primitive.tracepoint_trace_s(events) end # call-seq: @@ -193,7 +193,7 @@ class TracePoint # #=> RuntimeError: access from outside # def enable(target: nil, target_line: nil, target_thread: nil) - __builtin.tracepoint_enable_m(target, target_line, target_thread) + Primitive.tracepoint_enable_m(target, target_line, target_thread) end # call-seq: @@ -229,7 +229,7 @@ class TracePoint # trace.disable { p tp.lineno } # #=> RuntimeError: access from outside def disable - __builtin.tracepoint_disable_m + Primitive.tracepoint_disable_m end # call-seq: @@ -237,40 +237,40 @@ class TracePoint # # The current status of the trace def enabled? - __builtin.tracepoint_enabled_p + Primitive.tracepoint_enabled_p end # Type of event # # See TracePoint@Events for more information. def event - __builtin.tracepoint_attr_event + Primitive.tracepoint_attr_event end # Line number of the event def lineno - __builtin.tracepoint_attr_lineno + Primitive.tracepoint_attr_lineno end # Path of the file being run def path - __builtin.tracepoint_attr_path + Primitive.tracepoint_attr_path end # Return the parameters definition of the method or block that the # current hook belongs to. Format is the same as for Method#parameters def parameters - __builtin.tracepoint_attr_parameters + Primitive.tracepoint_attr_parameters end # Return the name at the definition of the method being called def method_id - __builtin.tracepoint_attr_method_id + Primitive.tracepoint_attr_method_id end # Return the called name of the method being called def callee_id - __builtin.tracepoint_attr_callee_id + Primitive.tracepoint_attr_callee_id end # Return class or module of the method being called. @@ -306,12 +306,12 @@ class TracePoint # C.foo # end def defined_class - __builtin.tracepoint_attr_defined_class + Primitive.tracepoint_attr_defined_class end # Return the generated binding object from event def binding - __builtin.tracepoint_attr_binding + Primitive.tracepoint_attr_binding end # Return the trace object during event @@ -319,23 +319,23 @@ class TracePoint # Same as TracePoint#binding: # trace.binding.eval('self') def self - __builtin.tracepoint_attr_self + Primitive.tracepoint_attr_self end # Return value from +:return+, +c_return+, and +b_return+ event def return_value - __builtin.tracepoint_attr_return_value + Primitive.tracepoint_attr_return_value end # Value from exception raised on the +:raise+ event def raised_exception - __builtin.tracepoint_attr_raised_exception + Primitive.tracepoint_attr_raised_exception end # Compiled source code (String) on *eval methods on the +:script_compiled+ event. # If loaded from a file, it will return nil. def eval_script - __builtin.tracepoint_attr_eval_script + Primitive.tracepoint_attr_eval_script end # Compiled instruction sequence represented by a RubyVM::InstructionSequence instance @@ -343,6 +343,6 @@ class TracePoint # # Note that this method is MRI specific. def instruction_sequence - __builtin.tracepoint_attr_instruction_sequence + Primitive.tracepoint_attr_instruction_sequence end end |