Skip to content

Commit f0b042e

Browse files
committed
refactor: locals_id renamed local_variables_id, because it represents the interned symbol "local_variables"
1 parent 6ce76f3 commit f0b042e

File tree

1 file changed

+3
-3
lines changed
  • gems/codetracer-ruby-recorder/ext/native_tracer/src

1 file changed

+3
-3
lines changed

gems/codetracer-ruby-recorder/ext/native_tracer/src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ struct Recorder {
4646
tracer: Box<dyn TraceWriter>,
4747
active: bool,
4848
to_s_id: ID,
49-
locals_id: ID,
49+
local_variables_id: ID,
5050
local_get_id: ID,
5151
inst_meth_id: ID,
5252
parameters_id: ID,
@@ -187,7 +187,7 @@ unsafe extern "C" fn ruby_recorder_alloc(klass: VALUE) -> VALUE {
187187
tracer: create_trace_writer("ruby", &vec![], TraceEventsFileFormat::Binary),
188188
active: false,
189189
to_s_id: rb_intern!("to_s"),
190-
locals_id: rb_intern!("local_variables"),
190+
local_variables_id: rb_intern!("local_variables"),
191191
local_get_id: rb_intern!("local_variable_get"),
192192
inst_meth_id: rb_intern!("instance_method"),
193193
parameters_id: rb_intern!("parameters"),
@@ -534,7 +534,7 @@ unsafe fn to_value(recorder: &mut Recorder, val: VALUE, depth: usize) -> ValueRe
534534
}
535535

536536
unsafe fn record_variables(recorder: &mut Recorder, binding: VALUE) -> Vec<FullValueRecord> {
537-
let vars = rb_funcall(binding, recorder.locals_id, 0);
537+
let vars = rb_funcall(binding, recorder.local_variables_id, 0);
538538
if !RB_TYPE_P(vars, rb_sys::ruby_value_type::RUBY_T_ARRAY) {
539539
return Vec::new();
540540
}

0 commit comments

Comments
 (0)