From: Jeremy Hinegardner Date: 2007-05-23T04:18:05+09:00 Subject: Re: string -> symbol On Wed, May 23, 2007 at 04:13:49AM +0900, mike.cahill@comcast.net wrote: > ok - i'm officially an idiot. > > i want to dynamically alias the names of all methods in a module... i need to string-manipulate the original method name to get the new one. alias_method only takes symbol names and the only tricks i know to convert strings to symbols (i.e., method("this_func") and SomeClass.method_eval("this_func) don't apply. > > my_module.instance_modules.each{ |m| > m_new_name = > alias_method > > > more generally, is there some easy way to convert strings to symbols that i've missed? "a_string".to_sym # => :a_string enjoy, -jeremy -- ======================================================================== Jeremy Hinegardner jeremy@hinegardner.org