From: Doug Edmunds Date: 2001-03-19T13:10:02+09:00 Subject: [ruby-talk:12841] Re: converting a string to a class My original subject line wasn't very accurate. Better would have been 'converting a string to a method' Let me try again. #the array I am interested in p self.methods I can hand-code the value of the methods separately For example, one of the methods in the array is "singleton_methods": p self.singleton_methods generates ["public", "private", "include", "to_s"] on my machine: I am trying to figure out how to loop thru the array of methods generated by self.methods to extract the values This involves some kind of catenation of "self." with each array value. This doesn't work: self.methods.each { | a_method | p "self.#{ a_method }" } It prints out strings "self.private" etc, not the value of those strings: It's the difference between p self.singleton_methods and p "self.singleton_methods"