Is there a way I can find all the variables in Ruby that begin with a particular string? For example, I have the following variables in my ruby program
ret_d = 1
ret_d2 = 23
Now, is there a function that will return ["ret_d","ret_d2"]? The problem is that I do not have the set of all variables.
Thanks.