runtime evaluation of variables

  • Thread starter Romaric ludinard Romaric
  • Start date
R

Romaric ludinard Romaric

Hi there,

I'm currently working with ruby and set_trace_func function. I need to
find local_variables, instance_variables and method parameters.

for local variables and instance variables, something like that works :
set_trace_func proc { |event, file, line, id, binding, classname|
local = eval("local_variables", binding)
instance = eval("instance_variables", binding)
...
}

but I can't find a way to find method parameters....

In fact, method parameters seems to be include in local variables,but on
call event, I can't distinguish some null parameters and come local
variables not yet assigned

Am I wrong ?

Is there another way to solve my problem ?

Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,431
Messages
2,571,677
Members
48,796
Latest member
Greg L.

Latest Threads

Top