File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed
gems/codetracer-ruby-recorder/ext/native_tracer/src Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -532,11 +532,10 @@ unsafe fn record_variables(recorder: &mut Recorder, binding: VALUE) {
532532 let ptr = RARRAY_CONST_PTR ( vars) ;
533533 for i in 0 ..len {
534534 let sym = * ptr. add ( i) ;
535- let id = rb_sym2id ( sym) ;
536- let name = CStr :: from_ptr ( rb_id2name ( id) ) . to_str ( ) . unwrap_or ( "" ) ;
535+ let name = cstr_to_string ( rb_id2name ( rb_sym2id ( sym) ) ) . unwrap_or_default ( ) ;
537536 let value = rb_funcall ( binding, recorder. id . local_variable_get , 1 , sym) ;
538537 let val_rec = to_value ( recorder, value, 10 ) ;
539- TraceWriter :: register_variable_with_full_value ( & mut * recorder. tracer , name, val_rec) ;
538+ TraceWriter :: register_variable_with_full_value ( & mut * recorder. tracer , & name, val_rec) ;
540539 }
541540}
542541
You can’t perform that action at this time.
0 commit comments