On Mon, Dec 02, 2002 at 09:40:27PM +0900, ts wrote: > >>>>> "M" == Mauricio =?iso-8859-1?Q?Fern=E1ndez?= <Mauricio> writes: > > M> I knew there was a difference, but I really expected something "bigger". > M> When I saw it, I thought "it introduces another scope, so what?". > > Strange that you see a scope, where I see a class :-) > > Probably I'm wrong. U joking? Who's the Ruby hacker extraordinaire (and Frenchman too :-) here (*)? If anything I must be wrong, but I'm not sure why. Do you mean that in > class A > B = 12 > def self.a > puts "class method A::a : #{B}" > end > > class << self > B = 24 > def b > puts "class method A::b : #{B}" > end > end > end A.a is defined "directly" implementation-wise and A.b via an anonymous singleton class? If so, when doing A.a Ruby would find that method directly in the class method table of class A, but for A.b it'd have to look for that method in the singleton class. Do things happen this way, or is the "class" vs "scope" thing just a wording issue? (*) je ne suis qu'moitifraníÂis! ;-) Maurice Julien FernáÏdez Pradier -- _ _ | |__ __ _| |_ ___ _ __ ___ __ _ _ __ | '_ \ / _` | __/ __| '_ ` _ \ / _` | '_ \ | |_) | (_| | |_\__ \ | | | | | (_| | | | | |_.__/ \__,_|\__|___/_| |_| |_|\__,_|_| |_| Running Debian GNU/Linux Sid (unstable) batsman dot geo at yahoo dot com snafu = Situation Normal All F%$*ed up