From: "David A. Black" Date: 2008-12-15T02:11:36+09:00 Subject: Re: singleton methods vs. meta instance methods Hi -- On Mon, 15 Dec 2008, Brian Candler wrote: > David A. Black wrote: >> Here's a demo of the consistency from the Class case to the SomeClass >> case. I'm still not convinced that it's the ideal behavior. > > Why not? It seems both consistent and reasonable to me. Similarly: > > $ ruby -pe 'gsub(/A/,"String")' sing.rb | ruby - Right; that's what I was demonstrating (the consistency, in that instances of Class, A, String... all behave the same way). My problem with what we're seeing is that I think the "false" flag should mean "defined in exactly this class" -- and, in fact, that's what I thought it did mean. Apparently it (consistently :-) does not mean that, when the receiver is a singleton class. 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)