From: Trans Date: 2008-03-23T20:46:46+09:00 Subject: Re: #meta On Mar 22, 7:13 pm, "Sean O'Halpin" wrote: > > Indeed - I'm using almost identical code in doodle[1] but using the > name #singleton_class instead of #meta :) > > def singleton_class(&block) > sc = (class << self; self; end) > sc.module_eval(&block) if block_given? > sc > end > > @Trans - doesn't #meta clash with an openuri attribute? I've just > removed it as an alias to #singleton_class in doodle for that reason. Yes, at the moment. But I recently checked the latest version of openuri, and it no longer conflicts. > FWIW, I'm considering renaming #singleton_class to avoid clashing with > someone else's definition. Perhaps, something like > #the_method_formerly_and_variously_known_as_singleton_eigen_or_meta_class > ;) Sorry, I think that's been used before ;) T.