From: "Thomas B." Date: 2008-09-22T22:09:24+09:00 Subject: Re: Symbol#re_s Thomas Sawyer wrote: > On Sep 21, 9:33�pm, Stephen Celis wrote: > >> > => :hello >> � �class Symbol >> � � �def method_missing(*args, &block) >> � � � �to_s.__send__(*args, &block).to_sym rescue super(*args, &block) >> � � �end >> � �end > > True, we can do this. And it sure is convenient, but this approach is > generally frowned upon because it can cover-up actual errors. But in > this case, maybe it's not significant? What do others think? > > T. I think that it's a better idea to have a constant table with names of methods that should be ported from String to Symbol, and compare the missing method's name against this table. TPR. -- Posted via http://www.ruby-forum.com/.