From: Brian Candler Date: 2009-09-01T23:19:47+09:00 Subject: Re: Easy Proxy Robert Klemme wrote: > Anybody think this should go into the core? -1, because it's already easy to add singleton methods and/or build proper wrapper classes with delegation - and the latter is usually a better solution longer-term (*) I do think that << should be more widely implemented: e.g. in Proc as an alias for #call, and in Hash for 'add [key,value] pair', so it becomes more useful for duck-typing. But I don't think that's the point you're trying to make here. Regards, Brian. (*) For example, the 'entries' proxy you return currently only implements #<<. What if you later want it to implement #size or #empty? or #first or ... Also, objects with singleton classes cannot be marshaled. -- Posted via http://www.ruby-forum.com/.