Examveda

What is the purpose of the trace_var method in Ruby?

A. To create a new instance of a variable

B. To track the usage of a specific variable throughout the execution of a program

C. To print the current value of a variable to the console

D. To set a callback that is triggered whenever a global variable is accessed or modified

Answer: Option D


This Question Belongs to Ruby Programming >> Advanced Topics In Ruby

Join The Discussion

Related Questions on Advanced Topics in Ruby