From: "David A. Black" Date: 2009-02-04T21:00:56+09:00 Subject: Re: Object#singleton_class in Ruby 1.9? Hi -- On Wed, 4 Feb 2009, Robert Dober wrote: > On Tue, Feb 3, 2009 at 10:25 PM, David A. Black wrote: > >> Nor is this kind of problem specific to singleton methods and >> singleton classes, of course. This is why I think it's very tricky to >> come up with rules in this area. In the end, it's always going to be >> about particular code and particular programming goals. > Ah very nicely put, indeed that shows me what I *should* have said: > > It is IMHO preferable that, in case of a name conflict, the framework > wins over the application using it. But maybe I am wrong and this is > not much better a scenario? To be honest, I'm having a hard time even thinking of a case when exactly this would happen. I'm trying to think what such library code would look like, and it's hard to picture a reasonable version :-) > (All boiling down as usual to testing and > testing and well... testing) Or, in other words, all boiling down to what the objects actually do when we send them messages. Funny how it always converges back onto that, isn't it? :-) David -- David A. Black / Ruby Power and Light, LLC Ruby/Rails consulting & training: http://www.rubypal.com Coming in 2009: The Well-Grounded Rubyist (http://manning.com/black2) http://www.wishsight.com => Independent, social wishlist management!